I am observing a strange behavior in the report using Verify.Contains.
How to reproduce:
Environment: LeanFT 14.52, Visual Studio 2017, NUnit 3.12, NUnit3TestAdapter 3.13, .Net Framework 4.6.1, Windows 10
- In Visual Studio -> File -> New Project -> LeanFT NUnit3 Project
- Add this code to LeanFTTest.cs
[Test] public void Test() { string text = "long text 2019?"; string correctYear = "2019"; string wrongYear = "2018"; Verify.Contains(correctYear, text); Verify.Contains(wrongYear, text); Verify.Contains(correctYear, text); Verify.Contains(correctYear, text); Verify.Contains(wrongYear, text); Verify.Contains(correctYear, text); }​
- Compile and execute the test
- Open the report (see attachment)
Another important question:
I thought that the UnitTestClassBase.cs is meant to connect/synchronize report outcome with the outcome of the NUnit test adapter, however, the test explorer is always green unless I use Assert. Is that correct/wanted?