Serialize() public method

public Serialize ( ) : string
return 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()));
        }
コード例 #2
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(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);
        }
コード例 #4
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);
        }
コード例 #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()));
        }
コード例 #6
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()));
        }