Invalid parsing of System.Uri under NUnit

Reproduced under ReSharper, from GUI-Runner, from NUnit-Console


Win 7 Pro, all updates, Ru-ru locale - reproduced

Win Server 2012, all En-us locale updates - reproduced

Try the following:

[TestFixture(Description = "Uri .ctors under Nunit must work exactly as no under Nunit")]
public class InvalidUriCtorUnderNnit
    public void PathsWithDotsMustBeParsedWell()
        const string urlWithDots = "";
        Assert.AreEqual(urlWithDots, new Uri(urlWithDots).ToString());




Uri not changed and " " is returned


Trimmed " " returned


  • It is broken and the trimmed Uri does not match the resource requested

  • This behavior has never occurred in production and cannot be caught except by performing a NUNIT.

  • We compared all the loaded versions of assemblies and the codebase - everything exactly coincided with the production

  • Tested the internet for this problem - nothing

Wish you can reproduce.

NUnit versions 2.6.2 and 2.6.3 have the same behavior.

Have posted us the issue


source to share

1 answer

The guys at NUnit are checking this out and coming up with one of the broken changes to .NET 4.5, so if NUnit gets rebuilt targeting that version should be fine. Uri normalization was a particular bug of all .net versions before, and I'm lucky to have just met it ...



All Articles