Example #1
0
        public void TestNone()
        {
            HeaderStories hs = new HeaderStories(none);

            Assert.IsNull(hs.GetPlcfHdd());
            Assert.AreEqual(0, hs.GetRange().Text.Length);
        }
Example #2
0
        public void TestHeader()
        {
            HeaderStories hs = new HeaderStories(header);

            Assert.AreEqual(60, hs.GetRange().Text.Length);

            // Should have the usual 6 Separaters
            // Then all 6 of the different header/footer kinds
            // Finally a terminater
            Assert.AreEqual(13, hs.GetPlcfHdd().Length);

            Assert.AreEqual(215, hs.GetRange().StartOffset);

            Assert.AreEqual(0, hs.GetPlcfHdd().GetProperty(0).Start);
            Assert.AreEqual(3, hs.GetPlcfHdd().GetProperty(1).Start);
            Assert.AreEqual(6, hs.GetPlcfHdd().GetProperty(2).Start);
            Assert.AreEqual(6, hs.GetPlcfHdd().GetProperty(3).Start);
            Assert.AreEqual(9, hs.GetPlcfHdd().GetProperty(4).Start);
            Assert.AreEqual(12, hs.GetPlcfHdd().GetProperty(5).Start);

            Assert.AreEqual(12, hs.GetPlcfHdd().GetProperty(6).Start);
            Assert.AreEqual(12, hs.GetPlcfHdd().GetProperty(7).Start);
            Assert.AreEqual(59, hs.GetPlcfHdd().GetProperty(8).Start);
            Assert.AreEqual(59, hs.GetPlcfHdd().GetProperty(9).Start);
            Assert.AreEqual(59, hs.GetPlcfHdd().GetProperty(10).Start);
            Assert.AreEqual(59, hs.GetPlcfHdd().GetProperty(11).Start);

            Assert.AreEqual(59, hs.GetPlcfHdd().GetProperty(12).Start);

            Assert.AreEqual("\u0003\r\r", hs.FootnoteSeparator);
            Assert.AreEqual("\u0004\r\r", hs.FootnoteContSeparator);
            Assert.AreEqual("", hs.FootnoteContNote);
            Assert.AreEqual("\u0003\r\r", hs.EndnoteSeparator);
            Assert.AreEqual("\u0004\r\r", hs.EndnoteContSeparator);
            Assert.AreEqual("", hs.EndnoteContNote);

            Assert.AreEqual("", hs.FirstHeader);
            Assert.AreEqual("", hs.EvenHeader);
            Assert.AreEqual("First header column!\tMid header Right header!\r\r", hs.OddHeader);

            Assert.AreEqual("", hs.FirstFooter);
            Assert.AreEqual("", hs.EvenFooter);
            Assert.AreEqual("", hs.OddFooter);
        }