protected override void Because_of() { sourceMember = ConfigProvider.FindTypeMapFor <Source, Destination>() .GetPropertyMaps() .Single(pm => pm.DestinationProperty.Name == memberName) .SourceMember; }
protected override void Because_of() { try { sourceMember = ConfigProvider.FindTypeMapFor <Source, Destination>() .GetPropertyMaps() .Single(pm => pm.DestinationProperty.Name == "Ignored") .SourceMember; } catch (Exception ex) { exception = ex; } }
public void Should_only_map_source_members() { var typeMap = ConfigProvider.FindTypeMapFor <Source, Destination>(); typeMap.GetPropertyMaps().Count().ShouldBe(1); }