Beispiel #1
0
 private static void Not_change_the_destination_object(SimpleMapper obj, LowerCaseContext context)
 {
     var result = new MappingTester<OutputClassLowerCase>().Verify(context.Destination, context.Expected);
     result.IsValid.ShouldBeTrue(result.ToString());
 }
Beispiel #2
0
 private static void Map_the_property_values(LowerCaseContext context)
 {
     var result = new MappingTester<OutputClassLowerCase>().Verify(context.Destination, context.Expected);
     result.IsValid.ShouldBeTrue(result.ToString());
 }
Beispiel #3
0
            private static void Inputs_whose_property_names_have_different_casing(SimpleMapper obj, LowerCaseContext context)
            {
                context.Source = new ClassFiller<InputClass>().Source;
                context.Destination = new OutputClassLowerCase();
                context.Expected = new OutputClassLowerCase
                                   {
                                       strIngPropErty = context.Source.StringProperty,
                                   };

                // sanity check that the property names are different by case alone
                var inputPropertyName = Reflection.GetPropertyName((InputClass input) => input.StringProperty);
                var actualPropertyName = Reflection.GetPropertyName((OutputClassLowerCase x) => x.strIngPropErty);
                actualPropertyName.ShouldNotBeEqualTo(inputPropertyName);
                String.Compare(actualPropertyName, inputPropertyName, StringComparison.OrdinalIgnoreCase).ShouldBeEqualTo(0);
            }
Beispiel #4
0
 private static void Map_is_called(SimpleMapper obj, LowerCaseContext context)
 {
     obj.Map(context.Source, context.Destination);
 }
Beispiel #5
0
 private static void A_null_source(SimpleMapper obj, LowerCaseContext context)
 {
     context.Source = null;
     context.Destination = new OutputClassLowerCase();
     context.Expected = new OutputClassLowerCase();
 }