示例#1
0
        public void TestPowerPoint()
        {
            string          path    = Path.GetFullPath(TestDataSample.GetOLE2Path("Test_Humor-Generation.ppt"));
            ParserContext   context = new ParserContext(path);
            IMetadataParser parser  = (IMetadataParser)ParserFactory.CreateMetadata(context);
            ToxyMetadata    x       = parser.Parse();

            Assert.AreEqual(8, x.Count);
            Assert.AreEqual("Funny Factory", x.Get("Title").Value);
        }
示例#2
0
        public void TestSolidWorksFile()
        {
            string          path    = Path.GetFullPath(TestDataSample.GetOLE2Path("TestSolidWorks.sldprt"));
            ParserContext   context = new ParserContext(path);
            IMetadataParser parser  = (IMetadataParser)ParserFactory.CreateMetadata(context);
            ToxyMetadata    x       = parser.Parse();

            Assert.AreEqual(10, x.Count);
            Assert.AreEqual("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}", x.Get("ClassID").Value);
            Assert.AreEqual("scj", x.Get("LastAuthor").Value);
        }
示例#3
0
        public void TestCorelDrawFile()
        {
            string          path    = Path.GetFullPath(TestDataSample.GetOLE2Path("TestCorel.shw"));
            ParserContext   context = new ParserContext(path);
            IMetadataParser parser  = (IMetadataParser)ParserFactory.CreateMetadata(context);
            ToxyMetadata    x       = parser.Parse();

            Assert.AreEqual(6, x.Count);
            Assert.AreEqual("thorsteb", x.Get("Author").Value);
            Assert.AreEqual("thorsteb", x.Get("LastAuthor").Value);
        }
示例#4
0
        public void TestWord()
        {
            string          path    = Path.GetFullPath(TestDataSample.GetOLE2Path("TestEditTime.doc"));
            ParserContext   context = new ParserContext(path);
            IMetadataParser parser  = (IMetadataParser)ParserFactory.CreateMetadata(context);
            ToxyMetadata    x       = parser.Parse();

            Assert.AreEqual(18, x.Count);

            path    = Path.GetFullPath(TestDataSample.GetOLE2Path("TestChineseProperties.doc"));
            context = new ParserContext(path);
            parser  = (IMetadataParser)ParserFactory.CreateMetadata(context);
            x       = parser.Parse();
            Assert.AreEqual(18, x.Count);
            Assert.AreEqual("雅虎網站分類", x.Get("Comments").Value);
            Assert.AreEqual("參考資料", x.Get("Title").Value);
        }