Beispiel #1
0
        public void Equals_ShouldReturnTrue_WhenAnySameAndValueNull()
        {
            var matchRule1 = new MatchRule <Value>(true, null);
            var matchRule2 = new MatchRule <Value>(true, null);

            matchRule2.ShouldEqual(matchRule1);

            matchRule1 = new MatchRule <Value>(false, new Value()
            {
                Property = "d"
            });
            matchRule2 = new MatchRule <Value>(true, null);
            matchRule2.ShouldNotEqual(matchRule1);
        }
Beispiel #2
0
        public void Equals_ShouldReturnTrue_WhenAnyAndValueSame()
        {
            var matchRule1 = new MatchRule <Value>(true, new Value()
            {
                Property = "A"
            });
            var matchRule2 = new MatchRule <Value>(true, new Value()
            {
                Property = "A"
            });

            matchRule2.ShouldEqual(matchRule1);

            matchRule1 = new MatchRule <Value>(false, new Value()
            {
                Property = "Z"
            });
            matchRule2 = new MatchRule <Value>(false, new Value()
            {
                Property = "Z"
            });
            matchRule2.ShouldEqual(matchRule1);
        }