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>();
        }
예제 #5
0
        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();
        }
예제 #6
0
        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();
        }
예제 #7
0
        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>();
        }
예제 #8
0
        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>();
        }