public static void TestBoyerMooreConversion() { string filename = @"..\..\..\..\ProjectTestFiles\longbs.txt"; string res = GuessFileFormat.BasicByteBoyerMoore(filename, "million-dollar"); Console.WriteLine(res); Assert.AreEqual("Bytes DETECTED!", res); }
public static void TestGuesser(string filename, string ext) { List <FASignature> outlist = GuessFileFormat.ReadFileHeaders(filename); foreach (var sig in outlist) { Console.WriteLine(sig.ToString(true)); } if (outlist.Count > 0) { Assert.AreEqual(ext, outlist[0].Extension.Trim().ToLower()); } else if (ext.Length == outlist.Count) { Assert.AreEqual(0, 0); } else { Assert.AreEqual(0, 1); } }
public static void TestBasicUnpackAndExamine(string filename, bool cleanup = true) { GuessFileFormat.BasicZipAndExamine(filename, cleanup); }