diff --git a/src/Chapter18.Tests/Listing18.06.Tests.cs b/src/Chapter18.Tests/Listing18.06.Tests.cs new file mode 100644 index 000000000..d93ac1489 --- /dev/null +++ b/src/Chapter18.Tests/Listing18.06.Tests.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter18.Listing18_06.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"Type parameter: System.Int32"; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter18.Tests/Listing18.16.Tests.cs b/src/Chapter18.Tests/Listing18.16.Tests.cs new file mode 100644 index 000000000..c56636e37 --- /dev/null +++ b/src/Chapter18.Tests/Listing18.16.Tests.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter18.Listing18_16.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"Help(?)"; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter18.Tests/Listing18.24.Tests.cs b/src/Chapter18.Tests/Listing18.24.Tests.cs new file mode 100644 index 000000000..17ee040ca --- /dev/null +++ b/src/Chapter18.Tests/Listing18.24.Tests.cs @@ -0,0 +1,19 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter18.Listing18_24.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"Begin... +MethodA() executing... +End..."; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter18.Tests/Listing18.26.Tests.cs b/src/Chapter18.Tests/Listing18.26.Tests.cs new file mode 100644 index 000000000..64771a207 --- /dev/null +++ b/src/Chapter18.Tests/Listing18.26.Tests.cs @@ -0,0 +1,18 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter18.Listing18_26.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + string expected = $@"Hello! My name is Inigo Montoya +{140.6} makes for a long triathlon."; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter18.Tests/Listing18.27.Tests.cs b/src/Chapter18.Tests/Listing18.27.Tests.cs new file mode 100644 index 000000000..5e2558e2b --- /dev/null +++ b/src/Chapter18.Tests/Listing18.27.Tests.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter18.Listing18_27.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"InigoMontoya"; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter18.Tests/Listing18.28.Tests.cs b/src/Chapter18.Tests/Listing18.28.Tests.cs new file mode 100644 index 000000000..415a87f25 --- /dev/null +++ b/src/Chapter18.Tests/Listing18.28.Tests.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter18.Listing18_28.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"Inigo Montoya"; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter19.Tests/Listing19.06.Tests.cs b/src/Chapter19.Tests/Listing19.06.Tests.cs new file mode 100644 index 000000000..0643e0015 --- /dev/null +++ b/src/Chapter19.Tests/Listing19.06.Tests.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter19.Listing19_06.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"ERROR: Operation is not valid due to the current state of the object."; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file