Exemple #1
0
        public void DefaultConstructor()
        {
            MsOfficeAnalyzer analyzer = new MsOfficeAnalyzer();

            //assertion here just to have
            Assert.NotNull(analyzer);
        }
Exemple #2
0
        public async Task Search(string path, string ext)
        {
            var      analyzer = new MsOfficeAnalyzer();
            FileInfo file     = new FileInfo(path);
            FileType type     = null;

            using (ReadResult result = await ReadResult.ReadFileHeaderAsync(file))
            {
                type = analyzer.Search(in result);
            }

            Assert.NotNull(type);
            Assert.Contains(ext, type.Extension);
        }