Exemplo n.º 1
0
        public void MappingCache2_2()
        {
            // Arrange
            var    first  = new First();
            Second second = null;

            var map = MappingCache <First, Second> .Map;

            // Act
            var result = map(first, second);

            // Assert
            Assert.IsNull(result.Second);
        }
Exemplo n.º 2
0
        public void MappingCache2()
        {
            // Arrange
            var first  = new First();
            var second = new Second();

            var map = MappingCache <First, Second> .Map;

            // Act
            var result = map(first, second);

            // Assert
            Assert.AreEqual(result.Second, second);
        }
Exemplo n.º 3
0
        public void MappingCache2()
        {
            // Arrange
            var first = new First();
            var second = new Second();

            var map = MappingCache<First, Second>.Map;

            // Act
            var result = map(first, second);

            // Assert
            Assert.Equal(result.Second, second);
        }
Exemplo n.º 4
0
        public void MappingCache3_2()
        {
            // Arrange
            var    first  = new First();
            Second second = null;
            var    third  = new Third();

            var map = MappingCache <First, Second, Third> .Map;

            // Act
            var result = map(first, second, third);

            // Assert
            Assert.Null(result.Second);
        }
Exemplo n.º 5
0
        public void MappingCache3()
        {
            // Arrange
            var first  = new First();
            var second = new Second();
            var third  = new Third();

            var map = MappingCache <First, Second, Third> .Map;

            // Act
            var result = map(first, second, third);

            // Assert
            Assert.Equal(result.Second.Third, third);
        }
Exemplo n.º 6
0
        public void MappingCache4()
        {
            // Arrange
            var first  = new First();
            var second = new Second();
            var third  = new Third();
            var fourth = new Fourth();

            var map = MappingCache <First, Second, Third, Fourth> .Map;

            // Act
            var result = map(first, second, third, fourth);

            // Assert
            Assert.AreEqual(result.Second.Third.Fourth, fourth);
        }
Exemplo n.º 7
0
        public void MappingCache4()
        {
            // Arrange
            var first = new First();
            var second = new Second();
            var third = new Third();
            var fourth = new Fourth();

            var map = MappingCache<First, Second, Third, Fourth>.Map;

            // Act
            var result = map(first, second, third, fourth);

            // Assert
            Assert.Equal(result.Second.Third.Fourth, fourth);
        }
Exemplo n.º 8
0
        public void MappingCache5_2()
        {
            // Arrange
            var    first  = new First();
            Second second = null;
            var    third  = new Third();
            var    fourth = new Fourth();
            var    fifth  = new Fifth();

            var map = MappingCache <First, Second, Third, Fourth, Fifth> .Map;

            // Act
            var result = map(first, second, third, fourth, fifth);

            // Assert
            Assert.IsNull(result.Second);
        }
Exemplo n.º 9
0
        public void MappingCache7()
        {
            // Arrange
            var first   = new First();
            var second  = new Second();
            var third   = new Third();
            var fourth  = new Fourth();
            var fifth   = new Fifth();
            var sixth   = new Sixth();
            var seventh = new Seventh();

            var map = MappingCache <First, Second, Third, Fourth, Fifth, Sixth, Seventh> .Map;

            // Act
            var result = map(first, second, third, fourth, fifth, sixth, seventh);

            // Assert
            Assert.Equal(result.Second.Third.Fourth.Fifth.Sixth.Seventh, seventh);
        }