Example #1
0
        public void Matches_should_detect_same_reference()
        {
            var sameReference = new PObject();
            var subj          = new MemberwiseEqualMatcher <PObject>(
                sameReference
                );

            Assert.True(subj.Matches(sameReference));
        }
Example #2
0
        public void Matches_should_detect_nominal()
        {
            var obj1 = new PObject {
                Field    = "Item",
                Property = 420,
                Value    = new PValueObject(),
            };
            var obj2 = new PObject {
                Field    = "Item",
                Property = 420,
                Value    = new PValueObject(),
            };
            var subj = new MemberwiseEqualMatcher <PObject>(
                obj1
                );

            Assert.True(subj.Matches(obj2));
        }