Example #1
0
        public void ValidateAllComparedPropertiesAreSame()
        {
            var expected = new Simple { Id = 1, Name = "A" };
            var candidate = new Simple { Id = 1, Name = "A" };

            Check(expected, candidate);
        }
Example #2
0
        public void ValidateDifferentStringPropertyMessage()
        {
            var expected = new Simple { Id = 1, Name = "A" };
            var candidate = new Simple { Id = 1, Name = "B" };

            CheckFault(expected, candidate, "Simple.Name", "A", "B");
        }
Example #3
0
        public void ValidateCompareValueWithCustomComparerFault()
        {
            var expected = new Simple { Id = 1, Value = 1 };
            var candidate = new Simple { Id = 1, Value = 1.1 };

            CheckFault(expected, candidate, "Simple.Value", "1", "1.1");
        }
Example #4
0
        public void ValidateDifferentIntPropertyMessage()
        {
            var expected = new Simple { Id = 1, Name = "A" };
            var candidate = new Simple { Id = 2, Name = "A" };

            CheckFault(expected, candidate, "Simple.Id", 1, 2);
        }
Example #5
0
        public void ValidateCompareValueWithCustomComparer()
        {
            var expected = new Simple { Id = 1, Value = 1 };
            var candidate = new Simple { Id = 1, Value = 1.0005 };

            Check(expected, candidate);
        }