public void MapToCustomerInfoThrowsArgumentNullExceptionIfObjectIsNull() { // Arrange ICustomerInfoMapper sut = new CustomerInfoMapper(); CustomerInfoEntity customerInfoEntity = null; // Act & Assert Assert.Throws <ArgumentNullException>(() => sut.MapToCustomerInfo(customerInfoEntity)); }
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); }