Exemplo n.º 1
0
        public void AddGenericMappingWithConstructedGenericSourceAndDestinationType_ShouldReturn_DestinationTypeOnGetWithSourceTypeAsInput(Type source, Type destination)
        {
            var options = new MapResultOptions();

            options.AddGenericMapping(source, destination);

            var result = options.GetGenericMapping(source);

            Assert.Equal(destination, result);
        }
Exemplo n.º 2
0
        public void AddGenericMappingWithWithNonCustructedSourceOrDestinationType_ShouldThrow_ArgumentException(Type source, Type destination)
        {
            var options = new MapResultOptions();

            Assert.Throws <ArgumentException>(() => options.AddGenericMapping(source, destination));
        }
Exemplo n.º 3
0
        public void AddGenericMappingWithSourceOrDestinationTypeEqualToNull_ShouldThrow_ArgumentNullException(Type source, Type destination)
        {
            var options = new MapResultOptions();

            Assert.Throws <ArgumentNullException>(() => options.AddGenericMapping(source, destination));
        }