public void testUpdateSubscription_CanContainDeleteDiscounts() { deleteDiscount dd1 = new deleteDiscount(); dd1.discountCode = "1"; deleteDiscount dd2 = new deleteDiscount(); dd2.discountCode = "2"; updateSubscription update = new updateSubscription(); update.subscriptionId = 1; update.deleteDiscounts.Add(dd1); update.deleteDiscounts.Add(dd2); String actual = update.Serialize(); String expected = @" <updateSubscription> <subscriptionId>1</subscriptionId> <deleteDiscount> <discountCode>1</discountCode> </deleteDiscount> <deleteDiscount> <discountCode>2</discountCode> </deleteDiscount> </updateSubscription>"; Assert.AreEqual(expected, actual); }
public void TestDeleteDiscount() { deleteDiscount ud = new deleteDiscount(); ud.discountCode = "1"; String actual = ud.Serialize(); String expected = @" <discountCode>1</discountCode>"; Assert.AreEqual(expected, actual); }