-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add tests for 2,8,9. Make 5.09 public * Delete extra listing 5.33 * Copy Listing4.26 to Chapter5.28 * Move Listing04.25B to Listing04.26
- Loading branch information
Showing
9 changed files
with
65 additions
and
47 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...g04.25B.IdenticalInFunctionality.Tests.cs → ...ng04.26.IdenticalInFunctionality.Tests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...Listing04.25B.IdenticalInFunctionality.cs → .../Listing04.26.IdenticalInFunctionality.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_02.Tests | ||
{ | ||
[TestClass] | ||
public class HeyYouTests | ||
{ | ||
[TestMethod] | ||
public void Main_MethodCalls_MethodsCalledSuccessfully() | ||
{ | ||
const string expected = | ||
@"Hey you!Enter your first name: <<Inigo | ||
>>Enter your last name: <<Montoya | ||
>>Your full name is Inigo Montoya."; | ||
|
||
IntelliTect.TestTools.Console.ConsoleAssert.Expect( | ||
expected, HeyYou.Main); | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/Chapter05.Tests/Listing05.08.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_08.Tests | ||
{ | ||
[TestClass] | ||
public class HelloWorldTests | ||
{ | ||
[TestMethod] | ||
public void Main_UsingToAvoidFullyQualifying_MethodCalledAsExpected() | ||
{ | ||
const string expected = | ||
@"Hello, my name is Inigo Montoya"; | ||
|
||
IntelliTect.TestTools.Console.ConsoleAssert.Expect( | ||
expected, HelloWorld.Main); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_09.Tests | ||
{ | ||
[TestClass] | ||
public class HeyYouTests | ||
{ | ||
[TestMethod] | ||
public void Main_StaticUsing_MethodsCalledNormally() | ||
{ | ||
const string expected = | ||
@"Hey you! | ||
Enter your first name: <<Inigo | ||
>>Enter your last name: <<Montoya | ||
>>Your full name is Inigo Montoya."; | ||
|
||
IntelliTect.TestTools.Console.ConsoleAssert.Expect( | ||
expected, HeyYou.Main); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Chapter04.Tests/Listing04.26.Tests.cs → src/Chapter05.Tests/Listing05.28.Tests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Chapter04/Listing04.26.TryCatch.cs → src/Chapter05/Listing05.28.TryCatch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
src/Chapter05/Listing05.33.ImplicitLocalVariablesWithAnonymousTypes.cs
This file was deleted.
Oops, something went wrong.