Beispiel #1
0
        public void Map_NonGeneric_MapsAll()
        {
            var sut = new FakeMapper();
            // ReSharper disable once SuspiciousTypeConversion.Global
            var source = (IEnumerable) new TestClassC[5];
            var result = sut.MapMultiple(source);

            sut.TypeMapping.ShouldNotBe(null);
            sut.ShouldNotBeAssignableTo <IEnumerable <TestClassB> >();
            result
            .Cast <TestClassB>()
            .Select(x => x.InnerClassCode)
            .ShouldBe(new int[] { 1, 2, 3, 4, 5 });
        }