예제 #1
0
        public void TestParseEmail()
        {
            DocumentIdentity doc = new DocumentIdentity()
            {
                FilePath = Path.GetFullPath(@"Lucy.Plugin.Parser\simpleMail.eml")
            };
            IParser plain = new PlainEml();
            var r = plain.Parse(doc);
            Assert.IsTrue(r.Count() == 3, "must be found 3 chuncks, 1 from and 2 to");
            Assert.IsTrue(r.Count(p => p.Metadata == "from") == 1, "from not found");
            Assert.IsTrue(r.Count(p => p.Metadata == "to") == 2, "to not found");


        }
예제 #2
0
 public void TestPluginDefinition()
 {
     IParser plain = new PlainEml();
     Assert.IsTrue(plain.Name.Length > 3, "A parser plugin must have a name");
     Assert.IsTrue(plain.SupportedFileExtensions.Contains(".eml"), "plain email parser support .eml extension");
 }