← Back to team overview

nunit-core team mailing list archive

[Bug 623240] [NEW] Has.Property does not work as expected

 

Public bug reported:

Well, the following test describes how I would have expected the
Has.Property() function to work.

        [Test]
        public void NUnitTest()
        {
            var constraint = Has.Property("X").EqualTo("Y");
            Assert.That(constraint, Is.InstanceOf<PropertyConstraint>());

            // Fails with:
            // Expected: instance of <NUnit.Framework.Constraints.PropertyConstraint>
            // But was:  <NUnit.Framework.Constraints.EqualConstraint>
        }

** Affects: nunitv2
     Importance: Undecided
         Status: New

-- 
Has.Property does not work as expected
https://bugs.launchpad.net/bugs/623240
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: New

Bug description:
Well, the following test describes how I would have expected the Has.Property() function to work.

        [Test]
        public void NUnitTest()
        {
            var constraint = Has.Property("X").EqualTo("Y");
            Assert.That(constraint, Is.InstanceOf<PropertyConstraint>());

            // Fails with:
            // Expected: instance of <NUnit.Framework.Constraints.PropertyConstraint>
            // But was:  <NUnit.Framework.Constraints.EqualConstraint>
        }





Follow ups

References