/* * This test fails surprisingly, even though it just outputs a string. * The exceptions thrown by the assert inside the tests which get executed * are caught. Nevertheless at least JetBrains Rider shows this test failing. */ public void Test_tests() { var fs = new Filesystem(TEMPLATE_FILENAME); var fl = new TextResultLog(); var cmd = new CLI.TestCommand("App_tests_with_failure.csrun", false, TEMPLATE_FILENAME); var sut = new App(fs, fl, cmd); var output = ConsoleOutput.Capture(() => sut.Execute()); Console.WriteLine(output); }
public void Test_functions() { var fs = new Filesystem(TEMPLATE_FILENAME); var fl = new TextResultLog(); var cmd = new CLI.RunCommand("App_tests_with_addition.csrun", TEMPLATE_FILENAME); var sut = new App(fs, fl, cmd); var output = ConsoleOutput.Capture(() => sut.Execute()); Assert.AreEqual("1+2=3", output.Trim()); }