public void using_the_mapperfor_attribute() { var sut = new AssemblyScanningMappingProvider(); sut.IgnoreInvalidMappers = true; sut.ReplaceDuplicateMappers = true; sut.Scan(); var actual = sut.Get(typeof(UsingAttribute)); actual.Should().NotBeNull(); }
public void use_the_ok_mapping() { var sut = new AssemblyScanningMappingProvider(); sut.IgnoreInvalidMappers = true; sut.ReplaceDuplicateMappers = true; sut.Scan(); var actual = sut.Get<Ok>(); actual.Should().NotBeNull(); }
public void ignore_mappings_that_are_interfaces() { var sut = new AssemblyScanningMappingProvider(); sut.IgnoreInvalidMappers = true; sut.ReplaceDuplicateMappers = true; sut.Scan(); Action actual = () => sut.Get<WithInterfaceMapping>(); actual.ShouldThrow<MappingNotFoundException>(); }
public void ignore_mappings_that_are_abstract() { var sut = new AssemblyScanningMappingProvider(); sut.IgnoreInvalidMappers = true; sut.ReplaceDuplicateMappers = true; sut.Scan(); Action actual = () => sut.Get<ClassThatHaveAnAbstractMapper>(); actual.ShouldThrow<MappingNotFoundException>(); }
public void use_the_ok_mapping() { var sut = new AssemblyScanningMappingProvider(); sut.IgnoreInvalidMappers = true; sut.ReplaceDuplicateMappers = true; sut.Scan(); var actual = sut.Get <Ok>(); actual.Should().NotBeNull(); }
public void ignore_mappings_that_are_interfaces() { var sut = new AssemblyScanningMappingProvider(); sut.IgnoreInvalidMappers = true; sut.ReplaceDuplicateMappers = true; sut.Scan(); Action actual = () => sut.Get <WithInterfaceMapping>(); actual.Should().Throw <MappingNotFoundException>(); }
public void ignore_mappings_that_are_abstract() { var sut = new AssemblyScanningMappingProvider(); sut.IgnoreInvalidMappers = true; sut.ReplaceDuplicateMappers = true; sut.Scan(); Action actual = () => sut.Get <ClassThatHaveAnAbstractMapper>(); actual.Should().Throw <MappingNotFoundException>(); }