예제 #1
0
        private void Compare_two_objects_with_value_type_properties()
        {
            var someObject    = new ObjectWithValueTypeProperties();
            var anotherObject = new ObjectWithValueTypeProperties {
                MyBoolean = true
            };

            new CharacterizationTest().CompareObjects(someObject, anotherObject);
        }
예제 #2
0
        private void We_tell_the_comparator_to_use_that_on_a_specific_object_when_comparing()
        {
            var anObject      = new ObjectWithValueTypeProperties();
            var anotherObject = new ObjectWithValueTypeProperties {
                MyBoolean = true
            };
            var test = new CharacterizationTest();

            test.Ignore(anObject, booleanPropertySelector);
            test.CompareObjects(anObject, anotherObject);
        }
예제 #3
0
        private void We_use_that_lambda_representation_when_we_compare_two_objects_that_differ_on_that_property()
        {
            var someObject    = new ObjectWithValueTypeProperties();
            var anotherObject = new ObjectWithValueTypeProperties {
                MyBoolean = true
            };
            var test = new CharacterizationTest();

            test.IgnoreOnType(booleanPropertySelector);
            test.CompareObjects(someObject, anotherObject);
        }
예제 #4
0
        private void We_do_the_comparison_on_two_slightly_different_objects_that_are_still_within_range()
        {
            var anObject      = new ObjectWithValueTypeProperties();
            var anotherObject = new ObjectWithValueTypeProperties {
                MyInteger = 9
            };
            var test = new CharacterizationTest();

            test.AllowOnType(integerPropertySelector, integerPropertyComparison);
            test.CompareObjects(anObject, anotherObject);
        }