コード例 #1
0
        public void MappingNullReturnsDefault()
        {
            var mapper = new AnimalAnimalModelMapper();

            var candidate = mapper.Map(null);

            Assert.IsNull(candidate);
        }
コード例 #2
0
        public void MappingNullReturnsDefault()
        {
            var mapper = new AnimalAnimalModelMapper();

            var candidate = mapper.Map(null);

            Assert.IsNull(candidate);
        }
コード例 #3
0
        public void MappingValue()
        {
            var mapper = new AnimalAnimalModelMapper();

            var source = new Animal { Id = 1, Name = "Test" };

            var expected = new AnimalModel { Id = 1, Name = "Test" };

            var candidate = mapper.Map(source);

            this.Check(expected, candidate);
        }
コード例 #4
0
        public void MappingValue()
        {
            var mapper = new AnimalAnimalModelMapper();

            var source = new Animal {
                Id = 1, Name = "Test"
            };

            var expected = new AnimalModel {
                Id = 1, Name = "Test"
            };

            var candidate = mapper.Map(source);

            this.Check(expected, candidate);
        }