public void MapAccount_ReturnsNull_WithNullInput() { //Arrange AplosIntegrationMappingService service = GetMappingService(); AplosApiAccountDetail aplosAccount = default; //Act PexAplosApiObject mappedAplosAccount = service.Map(aplosAccount); //Assert Assert.Null(mappedAplosAccount); }
public void MapAccounts_ReturnsNull_WithNullInput() { //Arrange AplosIntegrationMappingService service = GetMappingService(); AplosApiAccountDetail[] aplosAccounts = default; //Act IEnumerable <PexAplosApiObject> mappedAplosAccounts = service.Map(aplosAccounts); //Assert Assert.Null(mappedAplosAccounts); }
public void MapContact_ReturnsPexAplosApiObject_WithNonNullInput() { //Arrange AplosIntegrationMappingService service = GetMappingService(); AplosApiContactDetail aplosContact = new AplosApiContactDetail { Id = 123, CompanyName = "General Fund", }; //Act PexAplosApiObject mappedAplosContact = service.Map(aplosContact); //Assert Assert.NotNull(mappedAplosContact); Assert.Equal(aplosContact.Id.ToString(), mappedAplosContact.Id); Assert.Equal(aplosContact.CompanyName, mappedAplosContact.Name); }
public void MapAccount_ReturnsPexAplosApiObject_WithNonNullInput() { //Arrange AplosIntegrationMappingService service = GetMappingService(); AplosApiAccountDetail aplosAccount = new AplosApiAccountDetail { AccountNumber = 123, Name = "General Fund", }; //Act PexAplosApiObject mappedAplosAccount = service.Map(aplosAccount); //Assert Assert.NotNull(mappedAplosAccount); Assert.Equal(aplosAccount.AccountNumber.ToString(), mappedAplosAccount.Id); Assert.Equal(aplosAccount.Name, mappedAplosAccount.Name); }
public void MapAccounts_ReturnsPexAplosApiObject_WithNonNullInput() { //Arrange AplosIntegrationMappingService service = GetMappingService(); AplosApiAccountDetail[] aplosAccounts = new[] { new AplosApiAccountDetail { AccountNumber = 123, Name = "General Fund", } }; //Act IEnumerable <PexAplosApiObject> mappedAplosAccounts = service.Map(aplosAccounts); //Assert Assert.NotNull(mappedAplosAccounts); PexAplosApiObject mappedAplosAccount = mappedAplosAccounts.SingleOrDefault(); AplosApiAccountDetail aplosAccount = aplosAccounts[0]; Assert.Equal(aplosAccount.AccountNumber.ToString(), mappedAplosAccount.Id); Assert.Equal(aplosAccount.Name, mappedAplosAccount.Name); }