This question is locked. New answers and comments are not allowed.
Hi,
I use NUNit. I have a test method declared using the <Values(...)>-attribute like this:
The method will be run 5 times. The first time the test (using the allowed parameter avlue 1Y) fails. All following test runs succeed. The Unit Test Window now shows that the test succeeded. There is no indication that the first run failed. Using the NUnit Test Runner all 5 runs are shown and the first run is marked as failed.
To me it seems that your test runner takes the last run of the tests to determine if they succeeded or not.
If so, can you fix this?
I use NUNit. I have a test method declared using the <Values(...)>-attribute like this:
<Test()> _ Public Sub CanNotConvertCodeToDayTest(<Values("1Y", "-2S1M", "6M10", "10-30D", "M-5B")> maturityString As String) Dim result As Boolean = MaturityConverter.CanConvertCodeToDay(maturityString) Assert.AreEqual(False, result) End Sub
The method will be run 5 times. The first time the test (using the allowed parameter avlue 1Y) fails. All following test runs succeed. The Unit Test Window now shows that the test succeeded. There is no indication that the first run failed. Using the NUnit Test Runner all 5 runs are shown and the first run is marked as failed.
To me it seems that your test runner takes the last run of the tests to determine if they succeeded or not.
If so, can you fix this?