public void testUpdateSubscription_CanContainDeleteAddOns()
        {
            deleteAddOn dao1 = new deleteAddOn();

            dao1.addOnCode = "1";

            deleteAddOn dao2 = new deleteAddOn();

            dao2.addOnCode = "2";

            updateSubscription update = new updateSubscription();

            update.subscriptionId = 1;
            update.deleteAddOns.Add(dao1);
            update.deleteAddOns.Add(dao2);

            String actual   = update.Serialize();
            String expected = @"
<updateSubscription>
<subscriptionId>1</subscriptionId>
<deleteAddOn>
<addOnCode>1</addOnCode>
</deleteAddOn>
<deleteAddOn>
<addOnCode>2</addOnCode>
</deleteAddOn>
</updateSubscription>";

            Assert.AreEqual(Regex.Replace(expected, @"\s+", String.Empty), Regex.Replace(actual, @"\s+", String.Empty));
        }
Example #2
0
        public void testUpdateSubscription_CanContainDeleteAddOns()
        {
            var dao1 = new deleteAddOn();

            dao1.addOnCode = "1";

            var dao2 = new deleteAddOn();

            dao2.addOnCode = "2";

            var update = new updateSubscription();

            update.subscriptionId = 1;
            update.deleteAddOns.Add(dao1);
            update.deleteAddOns.Add(dao2);

            var actual   = update.Serialize();
            var expected = @"
<updateSubscription>
<subscriptionId>1</subscriptionId>
<deleteAddOn>
<addOnCode>1</addOnCode>
</deleteAddOn>
<deleteAddOn>
<addOnCode>2</addOnCode>
</deleteAddOn>
</updateSubscription>";

            Assert.AreEqual(expected, actual);
        }
        public void TestDeleteAddOn()
        {
            deleteAddOn dao = new deleteAddOn();

            dao.addOnCode = "1";

            String actual   = dao.Serialize();
            String expected = @"
<addOnCode>1</addOnCode>";

            Assert.AreEqual(Regex.Replace(expected, @"\s+", String.Empty), Regex.Replace(actual, @"\s+", String.Empty));
        }
Example #4
0
        public void TestDeleteAddOn()
        {
            deleteAddOn dao = new deleteAddOn();

            dao.addOnCode = "1";

            String actual   = dao.Serialize();
            String expected = @"
<addOnCode>1</addOnCode>";

            Assert.AreEqual(expected, actual);
        }
        public void testUpdateSubscription_CanContainDeleteAddOns()
        {
            var dao1 = new deleteAddOn();
            dao1.addOnCode = "1";

            var dao2 = new deleteAddOn();
            dao2.addOnCode = "2";

            var update = new updateSubscription();
            update.subscriptionId = 1;
            update.deleteAddOns.Add(dao1);
            update.deleteAddOns.Add(dao2);

            var actual = update.Serialize();
            var expected = @"
            <updateSubscription>
            <subscriptionId>1</subscriptionId>
            <deleteAddOn>
            <addOnCode>1</addOnCode>
            </deleteAddOn>
            <deleteAddOn>
            <addOnCode>2</addOnCode>
            </deleteAddOn>
            </updateSubscription>";
            Assert.AreEqual(expected, actual);
        }
        public void TestDeleteAddOn()
        {
            var dao = new deleteAddOn();
            dao.addOnCode = "1";

            var actual = dao.Serialize();
            var expected = @"
            <addOnCode>1</addOnCode>";
            Assert.AreEqual(expected, actual);
        }