Skip to content

Commit 13a8a39

Browse files
committed
Simplified test
1 parent 30a5a17 commit 13a8a39

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
1-

2-
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter13.Listing13_15.Tests;
1+
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter13.Listing13_15.Tests;
32

43
[TestClass]
54
public class ProgramTests
65
{
76
[TestMethod]
87
public void MainTest()
98
{
10-
const string expectedOutput = "ValidInput";
11-
string simulatedInput = "\n \nValidInput\n";
9+
const string expected = "<<ValidInput>>ValidInput";
1210

1311
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-
});
12+
expected, Program.Main
13+
);
2314
}
2415
}

0 commit comments

Comments
 (0)