2014-09-22 86 views
3

ReSharper的下转载下解析,从GUI的亚军,从NUnit控制台无效的System.Uri NUnit的

测试上:

的Win 7专业版,所有更新,RU-RU区域 - 转载

赢Server 2012中,所有更新恩美的语言环境 - 转载

试试这个:

[TestFixture(Description = "Uri .ctors under Nunit must work exactly as no under Nunit")] 
public class InvalidUriCtorUnderNnit 
{ 
    [Test] 
    public void PathsWithDotsMustBeParsedWell() 
    { 
     const string urlWithDots = "http://host.com/path./"; 
     Assert.AreEqual(urlWithDots, new Uri(urlWithDots).ToString()); 
    } 
} 

预计:

乌里没有改变, “http://host.com/path./” 返回

实际:

不全 “http://host.com/path/” 返回

注:

  1. 它坏了,而随之而来的Uri不匹配所需的资源

  2. 这种情况从来没有在生产和发生NUNIT除外下运行不能被捕获。

  3. 比较了所有加载的程序集版本和代码库 - 都完全符合生产

  4. 匹配在这个问题上测试互联网 - 没有

希望你能重现。

NUnit版本2.6.2和2.6.3具有相同的行为。

已经发布我们问题https://github.com/nunit/nunit/issues/237

+1

你能解释你看到什么行为和你的期望? – 2014-09-22 07:54:58

+1

而不是“http://host.com/path./”它返回“http://host.com/path/”,改善了问题 – 2014-09-22 08:34:26

回答

3

从NUnit的家伙检查,并founs,它是的.NET 4.5碎的变化之一,所以如果NUnit的将被重建瞄准了这一版本的一切都将被罚款。 Uri正常化是.net之前版本的所有版本的功能类错误,并且它是我刚刚遇到它的运气...