Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Code to add to UnitTest1.cs
- [TestMethod]
- public void TestStartsWithLower()
- {
- // Tests that we expect to return true.
- string[] words = { "alphabet", "zebra", "abc", "αυτοκινητοβιομηχανία", "государство" };
- foreach (var word in words)
- {
- bool result = word.StartsWithLower();
- Assert.IsTrue(result,
- $"Expected for '{word}': true; Actual: {result}");
- }
- }
- [TestMethod]
- public void TestDoesNotStartWithLower()
- {
- // Tests that we expect to return false.
- string[] words = { "Alphabet", "Zebra", "ABC", "Αθήνα", "Москва",
- "1234", ".", ";", " "};
- foreach (var word in words)
- {
- bool result = word.StartsWithLower();
- Assert.IsFalse(result,
- $"Expected for '{word}': false; Actual: {result}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement