Esempio n. 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);
            }
        }
Esempio n. 3
0
        public void ODF_FlatDocument_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("odf/test.fodt"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 5
0
        public void ODF_PresentationTemplate_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("odf/test.otp"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 7
0
        public void Media_WebM_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("video/test.webm"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 25
0
        public void ODF_Database_Returns_Not_Null()
        {
            using (var stream = GetFileFromZip("odf/test.odb"))
            {
                var fingerprint = FileFormat.Get(stream);

                Assert.IsNotNull(fingerprint);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }