开发者

Mysterious behaviour change of NUnit constraints

The following tests pass when using NUnit 2.4.8 and fail with NUnit 2.5.10:

using NUnit.Framework;

namespace SimpleTests
{
    [TestFixture]
    p开发者_开发百科ublic class NotConstraintTest
    {
        [Test]
        public void TestNotEquals()
        {
            var constraint = Is.Not.EqualTo("foo");
            Assert.That(constraint.Matches("bar"));
        }

        [Test]
        public void TestNotEmpty()
        {
            var constraint = Is.Not.Empty;
            Assert.That(constraint.Matches(new[] { "one", "two" }));
        }
    }
}

Did I miss anything subtle?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜