public void RunGoesOverAllDirectoryTest() { RecognitionRunner runner = new RecognitionRunner("data", this.recogniser); runner.Run(); recogniser.ReceivedWithAnyArgs(8).RecogniseCustom(""); recogniser.ReceivedWithAnyArgs(8).RecogniseDefault(""); }
public void RunOutputsValidNamesTest() { RecognitionRunner runner = new RecognitionRunner("data", this.recogniser); runner.Run(); DirectoryInfo dataDI = new DirectoryInfo("data"); foreach (DirectoryInfo di in dataDI.EnumerateDirectories().ToList()) { Assert.IsTrue(di.Exists); string[] fileNames = di.EnumerateFiles().Select((FileInfo fi) => fi.Name).ToArray(); Assert.IsTrue(fileNames.Contains("1introduction.txt")); } }
public void RunOutputsTextFileTest() { RecognitionRunner runner = new RecognitionRunner("data", this.recogniser); runner.Run(); DirectoryInfo dataDI = new DirectoryInfo("data"); Assert.AreNotEqual(0, dataDI.EnumerateDirectories().Count()); foreach (DirectoryInfo di in dataDI.EnumerateDirectories().ToList()) { Assert.IsTrue(di.Exists); Assert.AreNotEqual(di.EnumerateFiles().Count(), 0); string simpleResult = File.ReadAllText(di.EnumerateFiles().First().FullName); Assert.AreNotEqual(simpleResult.Count(), 0); } }