-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rename Listing03.01, 03.02 to add period * Add tests to Listings 02, 22, 26, 29
- Loading branch information
Showing
6 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
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,19 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_02.Tests | ||
{ | ||
[TestClass] | ||
public class UppercaseTests | ||
{ | ||
[TestMethod] | ||
public void Main_GivenValidString_MakeUppercase() | ||
{ | ||
const string expected = | ||
@"Enter text: <<test | ||
>>TEST"; | ||
|
||
IntelliTect.TestTools.Console.ConsoleAssert.Expect( | ||
expected, Uppercase.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,18 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_22.Tests | ||
{ | ||
[TestClass] | ||
public class ProgramTests | ||
{ | ||
[TestMethod] | ||
public void Main_GetCountOnArray_ReturnArrayLength() | ||
{ | ||
const string expected = | ||
"There are 9 languages in the array."; | ||
|
||
IntelliTect.TestTools.Console.ConsoleAssert.Expect( | ||
expected, Program.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,18 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_26.Tests | ||
{ | ||
[TestClass] | ||
public class ProgramTests | ||
{ | ||
[TestMethod] | ||
public void Main_GetLengthOfDimensionOf3DArray_ReturnsLength() | ||
{ | ||
const string expected = | ||
"2"; | ||
|
||
IntelliTect.TestTools.Console.ConsoleAssert.Expect( | ||
expected, Program.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,30 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_29.Tests | ||
{ | ||
[TestClass] | ||
public class PalindromeTests | ||
{ | ||
[TestMethod] | ||
public void Main_InputValidPalindrome_IdentifiedAsPalindrome() | ||
{ | ||
const string expected = | ||
@"Enter a palindrome: <<kayak | ||
>>""kayak"" is a palindrome."; | ||
|
||
IntelliTect.TestTools.Console.ConsoleAssert.Expect( | ||
expected, Palindrome.Main); | ||
} | ||
|
||
[TestMethod] | ||
public void Main_InputInvalidPalindrome_NotIdentifiedAsPalindrome() | ||
{ | ||
const string expected = | ||
@"Enter a palindrome: <<test | ||
>>""test"" is NOT a palindrome."; | ||
|
||
IntelliTect.TestTools.Console.ConsoleAssert.Expect( | ||
expected, Palindrome.Main); | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.