public void Init() { sch = new ScimUpdateHelper(); customer = new CustomerData() { CompanyName = "Company Name", Country = "XX", Language = "xx", FirstName = "FirstName", LastName = "LastName", EmailAddress = "*****@*****.**", City = "City" }; profile = new CustomerProfile() { CompanyName = "Company Name", Country = "XX", Language = "xx", FirstName = "FirstName", LastName = "LastName", EmailAddress = "*****@*****.**", City = "City" }; hpidProfile = new HPIDCustomerProfile(profile); }
public void SelectOperationTest_NewPositionsAdded_OldAPI() { HPIDCustomerProfile orig = new HPIDCustomerProfile(); Assert.IsTrue(sch.IsHPIDCustomerProfileUpdateRequired(customer, orig, false)); Assert.IsTrue(sch.AddOperationsCount == 5); Assert.IsTrue(sch.ReplaceOperationsCount == 0); Assert.IsTrue(sch.RemoveOperationsCount == 0); }
public void HPIDCustomerProfileTests_Ok() { CustomerProfile CustProfile = new CustomerProfile() { CompanyName = "CompanyName", Country = "US", Language = "en", FirstName = "FirstName", LastName = "LastName", EmailAddress = "*****@*****.**", City = "New", ActiveHealth = true, DisplayName = "DisplayName", EmailConsent = "Y", Gender = "F", Id = "asdsa", PrimaryUse = "Item002", Addresses = new System.Collections.Generic.List <Address>() { new Address() { Country = "US", Type = AddressType.home.ToString(), Role = "other", Primary = true } }, PhoneNumbers = new System.Collections.Generic.List <PhoneNumber>() { new PhoneNumber() { Primary = true, CountryCode = "US", Type = AddressType.home.ToString(), } } }; HPIDCustomerProfile hpapiProfile = new HPIDCustomerProfile(CustProfile); Assert.AreEqual(hpapiProfile.gender, CustProfile.Gender); Assert.AreEqual(hpapiProfile.displayName, CustProfile.DisplayName); Assert.AreEqual(hpapiProfile.addresses.Count, CustProfile.Addresses.Count); Assert.AreEqual(hpapiProfile.addresses.Count, CustProfile.Addresses.Count); }
private HPIDCustomerProfile CreateTestCustomerProfile() { HPIDCustomerProfile hpidCustProfile = new HPIDCustomerProfile() { name = new Name() { familyName = "LastName", givenName = "FirstName" }, countryResidence = "US", locale = $"en_US", displayName = "DisplayName", gender = "F", hpp_organizationName = "CompanyName", addresses = new System.Collections.Generic.List <Address>() { new Address() { Id = "XSDJDNDLSD", Country = "US", Type = AddressType.home.ToString(), Role = "other", Primary = true } }, phoneNumbers = new System.Collections.Generic.List <PhoneNumber>() { new PhoneNumber() { Id = "PBSDHDJDNDLSD", Primary = true, CountryCode = "US", Type = AddressType.home.ToString(), } } }; return(hpidCustProfile); }