Ejemplo n.º 1
0
        public void MapToCustomerInfoThrowsArgumentNullExceptionIfObjectIsNull()
        {
            // Arrange
            ICustomerInfoMapper sut = new CustomerInfoMapper();
            CustomerInfoEntity  customerInfoEntity = null;

            // Act & Assert
            Assert.Throws <ArgumentNullException>(() => sut.MapToCustomerInfo(customerInfoEntity));
        }
Ejemplo n.º 2
0
        public void MapToCustomerInfoMustReturnCorrectValues()
        {
            // Arrange
            ICustomerInfoMapper sut = new CustomerInfoMapper();
            var customerInfoEntity  = new CustomerInfoEntity(TestHelper.CustomerId, TestHelper.TenantId);

            // Act
            CustomerInfo actual = sut.MapToCustomerInfo(customerInfoEntity);

            //Assert
            Assert.Equal(customerInfoEntity.TenantId, actual.TenantId);
            Assert.Equal(customerInfoEntity.CustomerId, actual.CustomerId);
        }