public void CatRunTest()
        {
            Directory.SetCurrentDirectory("Files");
            List <string> args = new List <string> {
                "first test file.txt", "third test file.txt"
            };
            CommandResult result = new CommandCat().Run(args);

            Directory.SetCurrentDirectory("..");
            Assert.AreEqual(result.Errors, new List <string> {
                "Did not find the file third test file.txt."
            });
            Assert.AreEqual(result.Results, new List <string> {
                "https://petrathecat.github.io/smth/"
            });

            Assert.Pass();
        }
예제 #2
0
 public void SetUp()
 {
     executor = new CommandCat();
 }