示例#1
0
        public void TestGetSetCenterLeftRight()
        {
            XSSFOddFooter footer = new XSSFOddFooter(new CT_HeaderFooter());
            Assert.AreEqual("", footer.Center);
            footer.Center = ("My first center section");
            Assert.AreEqual("My first center section", footer.Center);
            footer.Center = ("No, let's update the center section");
            Assert.AreEqual("No, let's update the center section", footer.Center);
            footer.Left = ("And add a left one");
            footer.Right = ("Finally the right section is Added");
            Assert.AreEqual("And add a left one", footer.Left);
            Assert.AreEqual("Finally the right section is Added", footer.Right);

            // Test changing the three sections value
            footer.Center = ("Second center version");
            footer.Left = ("Second left version");
            footer.Right = ("Second right version");
            Assert.AreEqual("Second center version", footer.Center);
            Assert.AreEqual("Second left version", footer.Left);
            Assert.AreEqual("Second right version", footer.Right);
        }
示例#2
0
        public void TestGetSetCenterLeftRight()
        {
            XSSFOddFooter footer = new XSSFOddFooter(new CT_HeaderFooter());

            Assert.AreEqual("", footer.Center);
            footer.Center = ("My first center section");
            Assert.AreEqual("My first center section", footer.Center);
            footer.Center = ("No, let's update the center section");
            Assert.AreEqual("No, let's update the center section", footer.Center);
            footer.Left  = ("And add a left one");
            footer.Right = ("Finally the right section is Added");
            Assert.AreEqual("And add a left one", footer.Left);
            Assert.AreEqual("Finally the right section is Added", footer.Right);

            // Test changing the three sections value
            footer.Center = ("Second center version");
            footer.Left   = ("Second left version");
            footer.Right  = ("Second right version");
            Assert.AreEqual("Second center version", footer.Center);
            Assert.AreEqual("Second left version", footer.Left);
            Assert.AreEqual("Second right version", footer.Right);
        }