コード例 #1
0
        public void TestWithSomeNulls()
        {
            OPCPackage pkg = OPCPackage.Open(
                _slSamples.OpenResourceAsStream("49386-null_dates.pptx")
                );
            XSLFSlideShow sl = new XSLFSlideShow(pkg);

            POIXMLPropertiesTextExtractor ext = new POIXMLPropertiesTextExtractor(sl);

            ext.GetText();

            String text = ext.GetText();

            Assert.IsFalse(text.Contains("Created ="));       // With date is null
            Assert.IsTrue(text.Contains("CreatedString = ")); // Via string is blank
            Assert.IsTrue(text.Contains("LastModifiedBy = IT Client Services"));
        }
コード例 #2
0
        public void TestWithSomeNulls()
        {
            OPCPackage pkg = OPCPackage.Open(
                  _slSamples.OpenResourceAsStream("49386-null_dates.pptx")
            );
            XSLFSlideShow sl = new XSLFSlideShow(pkg);

            POIXMLPropertiesTextExtractor ext = new POIXMLPropertiesTextExtractor(sl);
            ext.GetText();

            String text = ext.GetText();
            Assert.IsFalse(text.Contains("Created =")); // With date is null
            Assert.IsTrue(text.Contains("CreatedString = ")); // Via string is blank
            Assert.IsTrue(text.Contains("LastModifiedBy = IT Client Services"));

            ext.Close();
        }