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")); }
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(); }