private static void Map_is_called_with_custom_properties_to_link(SimpleMapper obj, AlternateNameContext context) { context.Source.Map() .WithLink<OutputAlternativeNamesClass>(x => x.BooleanProperty, x => x.BoolProperty) .WithLink(x => x.DateTimeProperty, x => x.DateProperty) .WithLink(x => x.DateTimeToNullable, x => x.NullableDateProperty) .WithLink(x => x.DecimalProperty, x => x.DecProperty) .WithLink(x => x.IntegerProperty, x => x.IntProperty) .WithLink(x => x.StringProperty, x => x.StrProperty) .To(context.Destination); }
private static void Map_the_property_values(AlternateNameContext context) { var result = new MappingTester<OutputAlternativeNamesClass>().Verify(context.Destination, context.Expected); result.IsValid.ShouldBeTrue(result.ToString()); }
private static void Inputs_whose_property_names_have_different_spelling(SimpleMapper obj, AlternateNameContext context) { context.Source = new ClassFiller<InputClass>().Source; context.Destination = new OutputAlternativeNamesClass(); context.Expected = new OutputAlternativeNamesClass { BoolProperty = context.Source.BooleanProperty, DateProperty = context.Source.DateTimeProperty, NullableDateProperty = context.Source.DateTimeToNullable, DecProperty = context.Source.DecimalProperty, IntProperty = context.Source.IntegerProperty, StrProperty = context.Source.StringProperty, }; }