Beispiel #1
0
        public void TestParseNoChunks()
        {
            IParser plain = new PlainText();
            DocumentIdentity doc = new DocumentIdentity()
            {
                FilePath = Path.GetFullPath(@"Lucy.Plugin.Parser\plainText_0Chunks.txt")
            };
            IEnumerable<DocumentChunk> chunks = plain.Parse(doc);

            Assert.IsNotNull(chunks, "The result can be empty but not null");
            Assert.IsTrue(chunks.Count() == 0, "We should have not any chunk");
        }
Beispiel #2
0
 public void TestPluginDefinition()
 {
     IParser plain = new PlainText();            
     Assert.IsTrue(plain.Name.Length > 3, "A parser plugin must have a name");
     Assert.IsTrue(plain.SupportedFileExtensions.Contains(".txt"), "plain parser support .txt extension");
 }