Using ReSharper 8.2 on the local computer and NUnit 2.6.3 on the build server, some test was found that passed in ReSharper and failed to run in NUnit. Local and accurate NUnit results are installed, so this is not a difference between computers. Two of my colleagues conducted the same tests and had the same results, so I donβt think it would ruin my computer.
Simplified version of the tests:
[Test] public void Test_UrlQueryString() { var urlInput = "http://www.domain.com/page-with-querystring?url=https://www.domain2.com/page%3Fp%3DPEPE"; var uri = new Uri(urlInput); Assert.AreEqual(urlInput, uri.ToString()); } [Test] public void Test_Dot() { var urlInput = "http://www.domain.com/page-with-dot.?p=google"; var uri = new Uri(urlInput); Assert.AreEqual(urlInput, uri.ToString()); }
ReSharper's output is all green. Exiting NUnit:
Runtime Environment - OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1 CLR Version: 4.0.30319.18444 ( Net 4.5 ) ProcessModel: Default DomainUsage: Single Execution Runtime: net-4.5 ...................FF........ Tests run: 29, Errors: 0, Failures: 2, Inconclusive: 0, Time: 0.576769973208475 seconds Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0 Errors and Failures: 1) Test Failure : Test.OrganicTest.Test_Dot Expected string length 45 but was 44. Strings differ at index 35. Expected: "http://www.domain.com/page-with-dot.?p=google" But was: "http://www.domain.com/page-with-dot?p=google" ----------------------------------------------^ 2) Test Failure : Test.OrganicTest.Test_UrlQueryString Expected string length 87 but was 83. Strings differ at index 76. Expected: "...-with-querystring?url=https://www.domain2.com/page%3Fp%3DPEPE" But was: "...-with-querystring?url=https://www.domain2.com/page?p=PEPE" ----------------------------------------------------------------^
ReSharper seems to use the same version of NUnit (built-in NUnit 2.6.3)

Does anyone know how to fix this? Is this a bug in ReSharper or NUnit?
source share