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"); }
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"); }