public void TestNormalProperties()
        {
            POIFSFileSystem fs = new POIFSFileSystem(_samples.OpenResourceAsStream("TestMickey.doc"));
            HPSFPropertiesExtractor ext = new HPSFPropertiesExtractor(fs);
            String text = ext.Text;

            // Check each bit in turn
            String sinfText = ext.SummaryInformationText;
            String dinfText = ext.DocumentSummaryInformationText;

            Assert.IsTrue(sinfText.IndexOf("TEMPLATE = Normal") > -1);
            Assert.IsTrue(sinfText.IndexOf("SUBJECT = sample subject") > -1);
            Assert.IsTrue(dinfText.IndexOf("MANAGER = sample manager") > -1);
            Assert.IsTrue(dinfText.IndexOf("COMPANY = sample company") > -1);

            // Now overall
             text = ext.Text;
            Assert.IsTrue(text.IndexOf("TEMPLATE = Normal") > -1);
            Assert.IsTrue(text.IndexOf("SUBJECT = sample subject") > -1);
            Assert.IsTrue(text.IndexOf("MANAGER = sample manager") > -1);
            Assert.IsTrue(text.IndexOf("COMPANY = sample company") > -1);
        }
        public void TestNormalUnicodeProperties()
        {
            POIFSFileSystem fs = new POIFSFileSystem(_samples.OpenResourceAsStream("TestUnicode.xls"));
            HPSFPropertiesExtractor ext = new HPSFPropertiesExtractor(fs);
            string text = ext.Text;

            // Check each bit in turn
            String sinfText = ext.SummaryInformationText;
            String dinfText = ext.DocumentSummaryInformationText;

            Assert.IsTrue(sinfText.IndexOf("AUTHOR = marshall") > -1);
            Assert.IsTrue(sinfText.IndexOf("TITLE = Titel: \u00c4h") > -1);
            Assert.IsTrue(dinfText.IndexOf("COMPANY = Schreiner") > -1);
            Assert.IsTrue(dinfText.IndexOf("SCALE = False") > -1);

            // Now overall
            text = ext.Text;
            Assert.IsTrue(text.IndexOf("AUTHOR = marshall") > -1);
            Assert.IsTrue(text.IndexOf("TITLE = Titel: \u00c4h") > -1);
            Assert.IsTrue(text.IndexOf("COMPANY = Schreiner") > -1);
            Assert.IsTrue(text.IndexOf("SCALE = False") > -1);
        }
        public void TestCustomProperties()
        {
            POIFSFileSystem fs = new POIFSFileSystem(
                    _samples.OpenResourceAsStream("TestMickey.doc")
            );
            HPSFPropertiesExtractor ext = new HPSFPropertiesExtractor(fs);

            // Custom properties are part of the document info stream
            String dinfText = ext.DocumentSummaryInformationText;
            Assert.IsTrue(dinfText.IndexOf("Client = sample client") > -1);
            Assert.IsTrue(dinfText.IndexOf("Division = sample division") > -1);

            String text = ext.Text;
            Assert.IsTrue(text.IndexOf("Client = sample client") > -1);
            Assert.IsTrue(text.IndexOf("Division = sample division") > -1);
        }
 public void Test42726()
 {
     HPSFPropertiesExtractor ex = new HPSFPropertiesExtractor(HSSFTestDataSamples.OpenSampleWorkbook("42726.xls"));
     String txt = ex.Text;
     Assert.IsTrue(txt.IndexOf("PID_AUTHOR") != -1);
     Assert.IsTrue(txt.IndexOf("PID_EDITTIME") != -1);
     Assert.IsTrue(txt.IndexOf("PID_REVNUMBER") != -1);
     Assert.IsTrue(txt.IndexOf("PID_THUMBNAIL") != -1);
 }