Beispiel #1
0
        public void doTestExisting(StylesTable st)
        {
            // Check contents
            Assert.IsNotNull(st.GetCTStylesheet());
            Assert.AreEqual(11, st._GetXfsSize());
            Assert.AreEqual(1, st._GetStyleXfsSize());
            Assert.AreEqual(8, st._GetNumberFormatSize());

            Assert.AreEqual(2, st.GetFonts().Count);
            Assert.AreEqual(2, st.GetFills().Count);
            Assert.AreEqual(1, st.GetBorders().Count);

            Assert.AreEqual("yyyy/mm/dd", st.GetNumberFormatAt(165));
            Assert.AreEqual("yy/mm/dd", st.GetNumberFormatAt(167));

            Assert.IsNotNull(st.GetStyleAt(0));
            Assert.IsNotNull(st.GetStyleAt(1));
            Assert.IsNotNull(st.GetStyleAt(2));

            Assert.AreEqual(0, st.GetStyleAt(0).DataFormat);
            Assert.AreEqual(14, st.GetStyleAt(1).DataFormat);
            Assert.AreEqual(0, st.GetStyleAt(2).DataFormat);
            Assert.AreEqual(165, st.GetStyleAt(3).DataFormat);

            Assert.AreEqual("yyyy/mm/dd", st.GetStyleAt(3).GetDataFormatString());
        }