Replacement of .IsSameOrEqualTo() for extensions in v6.0 #1644
-
I'm working with an extension that uses public TObjectResultAssertion WithValue(object expectedValue, string reason = "", params object[] reasonArgs)
{
object actualValue = ObjectResultSubject.Value;
Execute.Assertion
.BecauseOf(reason, reasonArgs)
.ForCondition(actualValue.IsSameOrEqualTo(expectedValue))
.WithDefaultIdentifier(Identifier + ".Value")
.FailWith(FailureMessages.CommonFailMessage, expectedValue, actualValue);
return (TObjectResultAssertion)this;
}
|
Beta Was this translation helpful? Give feedback.
Answered by
dennisdoomen
Aug 14, 2021
Replies: 2 comments 4 replies
-
Since it's an internal piece of code, it was never meant to be reused outside our code base. But you can still copy the code if you really need it. Although in most cases, a simple |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
CNBoland
-
Hi, if (actualValue.Equals(expectedValue.Value))
{
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since it's an internal piece of code, it was never meant to be reused outside our code base. But you can still copy the code if you really need it. Although in most cases, a simple
Equals
should suffice.