Serialize() публичный Метод

public Serialize ( ) : string
Результат string
Пример #1
0
        public void TestUpdatePlan()
        {
            var updatePlan = new updatePlan();

            batchRequest.addUpdatePlan(updatePlan);

            Assert.AreEqual(1, batchRequest.getNumUpdatePlans());

            mockCnpFile.Verify(cnpFile => cnpFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), mockCnpTime.Object));
            mockCnpFile.Verify(cnpFile => cnpFile.AppendLineToFile(mockFilePath, updatePlan.Serialize()));
        }
        public void TestUpdatePlan_Full()
        {
            updatePlan update = new updatePlan();

            update.planCode = "abc";
            update.active   = true;

            String actual   = update.Serialize();
            String expected = @"
<updatePlan>
<planCode>abc</planCode>
<active>true</active>
</updatePlan>";

            Assert.AreEqual(Regex.Replace(expected, @"\s+", String.Empty), Regex.Replace(actual, @"\s+", String.Empty));
        }
Пример #3
0
        public void TestUpdatePlan_Full()
        {
            updatePlan update = new updatePlan();

            update.planCode = "abc";
            update.active   = true;

            String actual   = update.Serialize();
            String expected = @"
<updatePlan>
<planCode>abc</planCode>
<active>true</active>
</updatePlan>";

            Assert.AreEqual(expected, actual);
        }
        public void TestUpdatePlan_Full()
        {
            updatePlan update = new updatePlan();
            update.planCode = "abc";
            update.active = true;

            String actual = update.Serialize();
            String expected = @"
            <updatePlan>
            <planCode>abc</planCode>
            <active>true</active>
            </updatePlan>";
            Assert.AreEqual(expected, actual);
        }
Пример #5
0
        public void testUpdatePlan()
        {
            updatePlan updatePlan = new updatePlan();

            batchRequest.addUpdatePlan(updatePlan);

            Assert.AreEqual(1, batchRequest.getNumUpdatePlans());

            mockLitleFile.Verify(litleFile => litleFile.createRandomFile(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), mockLitleTime.Object));
            mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, updatePlan.Serialize()));
        }
        public void testUpdatePlan()
        {
            updatePlan updatePlan = new updatePlan();

            batchRequest.addUpdatePlan(updatePlan);

            Assert.AreEqual(1, batchRequest.getNumUpdatePlans());

            mockLitleFile.Verify(litleFile => litleFile.createRandomFile(It.IsAny<String>(), It.IsAny<String>(), It.IsAny<String>(), mockLitleTime.Object));
            mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, updatePlan.Serialize()));
        }