Beispiel #1
0
        public void MapAccount_ReturnsNull_WithNullInput()
        {
            //Arrange
            AplosIntegrationMappingService service      = GetMappingService();
            AplosApiAccountDetail          aplosAccount = default;

            //Act
            PexAplosApiObject mappedAplosAccount = service.Map(aplosAccount);

            //Assert
            Assert.Null(mappedAplosAccount);
        }
Beispiel #2
0
        public void MapAccounts_ReturnsNull_WithNullInput()
        {
            //Arrange
            AplosIntegrationMappingService service = GetMappingService();

            AplosApiAccountDetail[] aplosAccounts = default;

            //Act
            IEnumerable <PexAplosApiObject> mappedAplosAccounts = service.Map(aplosAccounts);

            //Assert
            Assert.Null(mappedAplosAccounts);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }