Exemple #1
0
        public void AddMappingWithSourceAndDestinationType_ShouldReturn_DestinationTypeOnGetWithSourceTypeAsInput(Type source, Type destination)
        {
            var options = new MapResultOptions();

            options.AddMapping(source, destination);

            var result = options.GetMapping(source);

            Assert.Equal(destination, result);
        }
Exemple #2
0
        public void AddMappingWithWithNonCustructedSourceOrDestinationType_ShouldThrow_ArgumentException(Type source, Type destination)
        {
            var options = new MapResultOptions();

            Assert.Throws <ArgumentException>(() => options.AddMapping(source, destination));
        }
Exemple #3
0
        public void AddMappingWithSourceOrDestinationTypeEqualToNull_ShouldThrow_ArgumentNullException(Type source, Type destination)
        {
            var options = new MapResultOptions();

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