Skip to content

Commit d29a7a5

Browse files
espence2003Emma Spence
andauthored
Chapter 4: added missing tests. Both fail and pass properly. (#329)
Co-authored-by: Emma Spence <emma.spence@intellitect.com>
1 parent 84fce57 commit d29a7a5

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
3+
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter04.Listing04_15.Tests
4+
{
5+
[TestClass]
6+
public class ProgramTests
7+
{
8+
[TestMethod]
9+
public void MainTest()
10+
{
11+
const string expected =
12+
@"z=122 y=121 x=120 w=119 v=118 u=117 t=116 s=115 r=114 q=113 p=112 o=111 n=110 m=109 l=108 k=107 j=106 i=105 h=104 g=103 f=102 e=101 d=100 c=99 b=98 a=97 ";
13+
14+
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
15+
expected, Program.Main);
16+
}
17+
}
18+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
3+
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter04.Listing04_27.Tests
4+
{
5+
[TestClass]
6+
public class ProgramTests
7+
{
8+
[TestMethod]
9+
public void MainTest()
10+
{
11+
const string expected = @"Enter the number of players (1 or 2):";
12+
13+
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
14+
expected, Program.Main);
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)