Refactored the extension method to call the native method.

This commit is contained in:
Mundairson
2018-06-05 12:25:06 +01:00
parent 8953021784
commit 379ac8a3cb
2 changed files with 36 additions and 12 deletions

View File

@@ -161,6 +161,29 @@ namespace Umbraco.Tests.Strings
Assert.AreEqual(expected, output);
}
[TestCase("", true)]
[TestCase(" ", true)]
[TestCase("\r\n\r\n", true)]
[TestCase("\r\n", true)]
[TestCase(@"
Hello
", false)]
[TestCase(null, true)]
[TestCase("a", false)]
[TestCase("abc", false)]
[TestCase("abc ", false)]
[TestCase(" abc", false)]
[TestCase(" abc ", false)]
public void IsNullOrWhiteSpace(string value, bool expected)
{
// Act
bool result = value.IsNullOrWhiteSpace();
// Assert
Assert.AreEqual(expected, result);
}
// FORMAT STRINGS
// note: here we just ensure that the proper helper gets called properly