public void BannerObjectTest() { var testObject = TestModels.GetBanner(); Assert.AreEqual("https://i.ytimg.com/vi/yaqe1qesQ8c/maxresdefault.jpg", testObject.bannerImageUrl); Assert.AreEqual("http://test.shop.com/expressly/api/49cb75d5-b823-4f0e-bdac-c2fee4bad9b6", testObject.migrationLink); }
public void CustomerObjectTest() { var testObject = TestModels.GetCustomer(); Assert.IsTrue(!string.IsNullOrEmpty(testObject.email)); Assert.AreEqual(0, testObject.userReference); }
public void EmailObjectTest() { var testObject = TestModels.GetEmail(); Assert.AreEqual("*****@*****.**", testObject.email); Assert.AreEqual("personal", testObject.alias); }
public void CartObjectTest() { var testObject = TestModels.GetCart(); Assert.AreEqual("4er23", testObject.couponCode); Assert.AreEqual("641356", testObject.productId); }
public void MigrationObjectTest() { var testObject = TestModels.GetMigration(); Assert.IsNotNull(testObject); Assert.IsNotNull(testObject.metada); Assert.IsNotNull(testObject.customer); }
public static Migration GetMigration() { string MigrationJson = "{\"meta\":" + MetadataTest.MetadataJson + "," + "\"data\":" + TestModels.GetCustomer().ConvertToJson() + "}"; return(JsonFormatter.ConvertFromJson <Migration>(MigrationJson)); }
public void PhoneObjectTest() { var testObject = TestModels.GetPhone(); Assert.AreEqual("L", testObject.type); Assert.AreEqual("02079460975", testObject.number); Assert.AreEqual(44, testObject.countryCode); }
public static InvoiceList GetInvoiceList() { List <Invoice> invoices = new List <Invoice> { TestModels.GetInvoice(), TestModels.GetInvoice() }; InvoiceList invoicesList = new InvoiceList { invoices = invoices }; return(invoicesList); }
public void InvoiceObjectTest() { var testObject = TestModels.GetInvoice(); Assert.AreEqual("*****@*****.**", testObject.email); Assert.AreEqual(1, testObject.orderCount); Assert.AreEqual(100.00, testObject.preTaxTotal); Assert.AreEqual(110.00, testObject.postTaxTotal); Assert.AreEqual(10.00, testObject.tax); Assert.IsNotNull(testObject.orders); Assert.IsTrue(testObject.orders.Count == 1); }
public void OrderObjectTest() { var testObject = TestModels.GetOrder(); Assert.AreEqual("ORDER-5321311", testObject.id); Assert.AreEqual("2015-07-10", testObject.date); Assert.AreEqual(2, testObject.itemCount); Assert.AreEqual("COUPON", testObject.coupon); Assert.AreEqual("GBP", testObject.currency); Assert.AreEqual(100.00, testObject.preTaxTotal); Assert.AreEqual(110.00, testObject.postTaxTotal); Assert.AreEqual(10.00, testObject.tax); }
public void AddressObjectTest() { var testObject = TestModels.GetAddress(); Assert.AreEqual("Test", testObject.firstName); Assert.AreEqual("Burberry", testObject.lastName); Assert.AreEqual("Basement Flat", testObject.address1); Assert.AreEqual("61 Wellfield Road", testObject.address2); Assert.AreEqual("Roath", testObject.city); Assert.AreEqual("company", testObject.companyName); Assert.AreEqual("CF24 3DG", testObject.zip); Assert.AreEqual(0, testObject.phone); Assert.AreEqual("home", testObject.addressAlias); Assert.AreEqual("Cardiff", testObject.stateProvince); Assert.AreEqual("GB", testObject.country); }
public void CustomerDataObjectTest() { var testObject = TestModels.GetCustomerData(); Assert.AreEqual("Test", testObject.firstName); Assert.AreEqual("LastTest", testObject.lastName); Assert.AreEqual("M", testObject.gender); Assert.AreEqual(0, testObject.billingAddress); Assert.AreEqual(0, testObject.shippingAddress); Assert.AreEqual("2015-12-10T18:24:42.000Z", testObject.dateUpdated); Assert.AreEqual(0, testObject.numberOrdered); Assert.IsTrue(testObject.emails.Count == 1); Assert.IsNotNull(testObject.emails); Assert.IsTrue(testObject.phones.Count == 1); Assert.IsNotNull(testObject.phones); Assert.IsTrue(testObject.addresses.Count == 1); Assert.IsNotNull(testObject.addresses); }
public void PhoneToStringTest() { Assert.IsFalse(TestModels.GetPhone().ToString().Length == 0); }
public void PhoneConvertToJsonTest() { Assert.IsFalse(TestModels.GetPhone().ConvertToJson().Length == 0); }
public void BannerToStringTest() { Assert.IsFalse(TestModels.GetBanner().ToString().Length == 0); }
public void AddressToStringTest() { Assert.IsFalse(TestModels.GetAddress().ToString().Length == 0); }
public void EmailToStringTest() { Assert.IsFalse(TestModels.GetEmail().ToString().Length == 0); }
public void CartToStringTest() { Assert.IsFalse(TestModels.GetCart().ToString().Length == 0); }
public void MigrationToStringTest() { Assert.IsFalse(TestModels.GetMigration().ToString().Length == 0); }
public void MigrationConvertToJsonTest() { Assert.IsFalse(TestModels.GetMigration().ConvertToJson().Length == 0); }
public void CustomerDataToStringTest() { Assert.IsFalse(TestModels.GetCustomerData().ToString().Length == 0); }
public void InvoiceToStringTest() { Assert.IsFalse(TestModels.GetInvoice().ToString().Length == 0); }
public void InvoiceConvertToJsonTest() { Assert.IsFalse(TestModels.GetInvoice().ConvertToJson().Length == 0); }
public void BannerConvertToJsonTest() { Assert.IsFalse(TestModels.GetBanner().ConvertToJson().Length == 0); }
public void CartConvertToJsonTest() { Assert.IsFalse(TestModels.GetCart().ConvertToJson().Length == 0); }
public void CustomerDataConvertToJsonTest() { Assert.IsFalse(TestModels.GetCustomerData().ConvertToJson().Length == 0); }
public void AddressConvertToJsonTest() { Assert.IsFalse(TestModels.GetAddress().ConvertToJson().Length == 0); }
public void EmailConvertToJsonTest() { Assert.IsFalse(TestModels.GetEmail().ConvertToJson().Length == 0); }