diff --git a/src/Chapter22.Tests/Listing22.09.Tests.cs b/src/Chapter22.Tests/Listing22.09.Tests.cs new file mode 100644 index 000000000..cd8f91f68 --- /dev/null +++ b/src/Chapter22.Tests/Listing22.09.Tests.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter22.Listing22_09.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"ENTER to shut down"; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter22.Tests/Listing22.10.Tests.cs b/src/Chapter22.Tests/Listing22.10.Tests.cs new file mode 100644 index 000000000..322f814a6 --- /dev/null +++ b/src/Chapter22.Tests/Listing22.10.Tests.cs @@ -0,0 +1,23 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter22.Listing22_10.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"Application started.... +Starting task.... +DoWork() started.... + Waiting while thread executes... +DoWork() ending.... +Thread completed +Application shutting down...."; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter22.Tests/Listing22.11.Tests.cs b/src/Chapter22.Tests/Listing22.11.Tests.cs new file mode 100644 index 000000000..6a1263c8e --- /dev/null +++ b/src/Chapter22.Tests/Listing22.11.Tests.cs @@ -0,0 +1,18 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter22.Listing22_11.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + string expected = $@"Decrement Count = {-32767.01134} +Main Count = {32767.01134}"; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter22.Tests/Listing22.12.Tests.cs b/src/Chapter22.Tests/Listing22.12.Tests.cs new file mode 100644 index 000000000..316e5aca4 --- /dev/null +++ b/src/Chapter22.Tests/Listing22.12.Tests.cs @@ -0,0 +1,18 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter22.Listing22_12.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"Decrement Count = * +Main Count = *"; + + IntelliTect.TestTools.Console.ConsoleAssert.ExpectLike( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter23.Tests/Listing23.17.Tests.cs b/src/Chapter23.Tests/Listing23.17.Tests.cs new file mode 100644 index 000000000..3cda4f5f8 --- /dev/null +++ b/src/Chapter23.Tests/Listing23.17.Tests.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter23.Listing23_17.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"S5280ft = Smile "; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter23.Tests/Listing23.18.Tests.cs b/src/Chapter23.Tests/Listing23.18.Tests.cs new file mode 100644 index 000000000..972f88b76 --- /dev/null +++ b/src/Chapter23.Tests/Listing23.18.Tests.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter23.Listing23_18.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = @"S5280ft = Smile "; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file diff --git a/src/Chapter23.Tests/Listing23.19.Tests.cs b/src/Chapter23.Tests/Listing23.19.Tests.cs new file mode 100644 index 000000000..194567623 --- /dev/null +++ b/src/Chapter23.Tests/Listing23.19.Tests.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter23.Listing23_19.Tests +{ + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + const string expected = "30° 18\' 0\""; + + IntelliTect.TestTools.Console.ConsoleAssert.Expect( + expected, Program.Main); + } + } +} \ No newline at end of file