示例#1
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                Usage();

                return;
            }

            var fileName = args[0];

            if (!File.Exists(fileName))
            {
                Console.WriteLine("Error: Cannot find file - " + fileName);
                Console.WriteLine();

                return;
            }

            var fingerprint = FileFormat.Get(fileName);

            if (fingerprint == null)
            {
                Console.WriteLine("Unknown format.");
                Console.WriteLine();
            }
            else
            {
                WriteFingerprint(fingerprint);
            }
        }
        public void OOXml_ExcelAddin_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.xlam"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is ExcelAddinFormat);
            }
        }
示例#3
0
        public void ODF_FlatDocument_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("odf/test.fodt"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
示例#4
0
        public void ODF_Database_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("odf/test.odb"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is ODFDatabaseFormat);
            }
        }
示例#5
0
        public void ODF_PresentationTemplate_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("odf/test.otp"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
示例#6
0
        public void ODF_Spreadsheet_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("odf/test.ods"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is ODFSpreadsheetFormat);
            }
        }
示例#7
0
        public void Media_WebM_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("video/test.webm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
示例#8
0
        public void Media_Matroska_Audio_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("audio/test.mka"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
        public void OOXml_StencilWithMacros_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.vssm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
示例#10
0
        public void OOXml_DrawingTemplateWithMacros_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.vstm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is VisioDrawingTemplateFormat);
            }
        }
示例#11
0
        public void OOXml_DrawingTemplate_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.vstx"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
示例#12
0
        public void OOXml_SlideshowWithMacros_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.ppsm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is PowerPointSlideshowFormat);
            }
        }
示例#13
0
        public void OOXml_Slideshow_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.ppsx"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
示例#14
0
        public void OOXml_PresentationTemplateWithMacros_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.potm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is PowerPointPresentationTemplateFormat);
            }
        }
示例#15
0
        public void OOXml_PresentationTemplateWithMacros_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.potm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
示例#16
0
        public void Media_RealAudio_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("audio/test.ra"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is RealAudioFormat);
            }
        }
示例#17
0
        public void Media_AMR_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("audio/test.amr"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is AMRFormat);
            }
        }
示例#18
0
        public void OOXml_StenvilWithMacros_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.vssm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is VisioStencilFormat);
            }
        }
示例#19
0
        public void Media_Matroska_Audio_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("audio/test.mka"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is MatroskaFormat);
            }
        }
示例#20
0
        public void OOXml_DocumentWithMacros_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("microsoft/ooxml/test.docm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is WordDocumentFormat);
            }
        }
示例#21
0
        public void Media_WebM_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("video/test.webm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is WebMFormat);
            }
        }
示例#22
0
        public void Media_3G2_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("video/test.3g2"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is ThreeGP2Format);
            }
        }
示例#23
0
        public void ODF_Presentation_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("odf/test.odp"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is ODFPresentationFormat);
            }
        }
示例#24
0
        public void Media_QuickTime_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("video/test.mov"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is QuickTimeFormat);
            }
        }
示例#25
0
        public void ODF_Database_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("odf/test.odb"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
示例#26
0
        public void Media_Ogg_Video_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("video/test.ogv"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is OggFormat);
            }
        }
示例#27
0
        public void ODF_DocumentTemplate_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("odf/test.ott"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is ODFDocumentTemplateFormat);
            }
        }
示例#28
0
        public void Media_ASF_Video_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("video/test.wmv"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is AdvancedSystemsFormat);
            }
        }
示例#29
0
        public void ODF_FlatDocument_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("odf/test.fodt"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is ODFFlatDocumentFormat);
            }
        }
示例#30
0
        public void Media_Dolby_AC3_Audio_Is_Correct_Format()
        {
            using (var stream = GetFileFromZip("audio/test.ac3"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.True(fingerprint is AC3Format);
            }
        }