public static void AssertEqual(AddressDto expected, AddressDto actual) { if (expected == null) { Assert.IsNull(actual, "Address is not expected to be null."); } Assert.AreEqual(expected.Street, !string.IsNullOrEmpty(actual.Street) ? actual.Street.Replace("|", "\r\n") : actual.Street, "Different Street."); Assert.AreEqual(expected.City, actual.City, "Different City."); Assert.AreEqual(expected.State, actual.State, "Different State."); Assert.AreEqual(expected.PostCode, actual.PostCode, "Different PostCode."); }
public ContactDto GetContactInvalidAbn() { ContactDto dto = new ContactDto(); dto.Salutation = "Mr."; dto.GivenName = "John"; dto.FamilyName = "Smith"; dto.OrganisationName = "Invalid ABN Contact Org" + DateTime.UtcNow.ToString(); dto.OrganisationPosition = "Director"; dto.OrganisationAbn = "ABC123"; dto.Email = "*****@*****.**"; dto.MainPhone = "02 9999 9999"; dto.MobilePhone = "0444 444 444"; AddressDto address = new AddressDto(); address.Street = "3/33 Victory Av"; address.City = "North Sydney"; address.State = "NSW"; address.Country = "Australia"; dto.PostalAddress = address; return dto; }
public ContactDto GetContact1() { ContactDto dto = new ContactDto(); dto.Salutation = "Mr."; dto.GivenName = "Gawe"; dto.FamilyName = "Jannie"; dto.OrganisationName = "ACME Pty Ltd"; dto.OrganisationPosition = "Director"; dto.Email = "*****@*****.**"; dto.MainPhone = "02 9999 9999"; dto.MobilePhone = "0444 444 444"; AddressDto address = new AddressDto(); address.Street = @"3/33 Victory Av"; address.City = "North Sydney"; address.State = "NSW"; address.Country = "Sydney"; AddressDto otherAddres = new AddressDto(); otherAddres.Street = "111 Elizabeth street"; otherAddres.City = "Sydney"; otherAddres.State = "NSW"; otherAddres.Country = "United States"; dto.PostalAddress = address; dto.OtherAddress = otherAddres; dto.AutoSendStatement = true; dto.CompanyEmail = "*****@*****.**"; dto.IsCustomer = true; dto.SaleTradingTermsPaymentDueInInterval = 7; dto.SaleTradingTermsPaymentDueInIntervalType = (int)TimeIntervalType.Day; dto.PurchaseTradingTermsPaymentDueInInterval = 2; dto.PurchaseTradingTermsPaymentDueInIntervalType = (int)TimeIntervalType.Week; return dto; }