We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30a5a17 commit 13a8a39Copy full SHA for 13a8a39
src/Chapter13.Tests/Listing13.15.Tests.cs
@@ -1,24 +1,15 @@
1
-
2
-namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter13.Listing13_15.Tests;
+namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter13.Listing13_15.Tests;
3
4
[TestClass]
5
public class ProgramTests
6
{
7
[TestMethod]
8
public void MainTest()
9
10
- const string expectedOutput = "ValidInput";
11
- string simulatedInput = "\n \nValidInput\n";
+ const string expected = "<<ValidInput>>ValidInput";
12
13
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
14
- expectedOutput,
15
- () =>
16
- {
17
- using (StringReader simulatedReader = new (simulatedInput))
18
19
- Console.SetIn(simulatedReader);
20
- Program.Main();
21
- }
22
- });
+ expected, Program.Main
+ );
23
}
24
0 commit comments