You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a scenario where we have extensive test cases which use the ExpectedResult argument of the TestCase attribute.
Within those test we have a new need to be able to assess the ExpectedResult.
Rather than convert the tests so that the ExpectedResult is passed in as an argument and an assert performed we would like to be able to examine the ExpectedResult in the same we can see the MethodName and the Arguments.
We've been able to hack together a solution using reflection against the _test field and the internal ExpectedResult property of the TestMethod class but it would be nicer if we didn't have to do this.
See #4100 for a simple PR that exposes this property.
The text was updated successfully, but these errors were encountered:
Can you explain your scenario a bit more?
Knowing the ExpectedResult in a test either is cheating or doing Nunit's job to compare the actual result with the expected.
We have a scenario where we have extensive test cases which use the
ExpectedResult
argument of theTestCase
attribute.Within those test we have a new need to be able to assess the
ExpectedResult
.Rather than convert the tests so that the
ExpectedResult
is passed in as an argument and an assert performed we would like to be able to examine theExpectedResult
in the same we can see theMethodName
and theArguments
.We've been able to hack together a solution using reflection against the _test field and the internal
ExpectedResult
property of theTestMethod
class but it would be nicer if we didn't have to do this.See #4100 for a simple PR that exposes this property.
The text was updated successfully, but these errors were encountered: