Skip to content

Commit fd9d2c9

Browse files
espence2003Emma Spence
andauthored
Added in listing tests and privacy specification Chapter 6 (#330)
Co-authored-by: Emma Spence <emma.spence@intellitect.com>
1 parent d29a7a5 commit fd9d2c9

File tree

4 files changed

+52
-1
lines changed

4 files changed

+52
-1
lines changed
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.Chapter06.Listing06_01.Tests
4+
{
5+
[TestClass]
6+
public class ProgramTests
7+
{
8+
[TestMethod]
9+
public void MainTest()
10+
{
11+
const string expected = @"No output in this example";
12+
13+
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
14+
expected, Program.Main);
15+
}
16+
}
17+
}
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.Chapter06.Listing06_34.Tests
4+
{
5+
[TestClass]
6+
public class EmployeeTests
7+
{
8+
[TestMethod]
9+
public void MainTest()
10+
{
11+
const string expected = @"Inigo Montoya";
12+
13+
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
14+
expected, Program.Main);
15+
}
16+
}
17+
}
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.Chapter06.Listing06_49.Tests
4+
{
5+
[TestClass]
6+
public class DirectoryTests
7+
{
8+
[TestMethod]
9+
public void MainTest()
10+
{
11+
const string expected = @"System.Boolean[,,]";
12+
13+
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
14+
expected, Program.Main);
15+
}
16+
}
17+
}

src/Chapter06/Listing06.49.DeclaringAReadOnlyAutomaticallyImplementedProperty.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class CommonGuid
1515
// ...
1616
}
1717

18-
class Program
18+
public class Program
1919
{
2020
public static void Main()
2121
{

0 commit comments

Comments
 (0)