Fixed up base web test, removes RequiresDbSetup in place of new database behavior - NoDatabasePerFixture.

Fixed issue with another test... no idea how it didn't show up failing before.
Fixes issue with string extensions and an infinite loop when the string to strip is empty/null.
This commit is contained in:
Shannon Deminick
2013-03-15 11:28:05 +06:00
parent bd81507ecb
commit 2b750843c5
19 changed files with 79 additions and 76 deletions

View File

@@ -188,6 +188,8 @@ namespace Umbraco.Core
public static string TrimEnd(this string value, string forRemoving)
{
if (string.IsNullOrEmpty(value)) return value;
if (string.IsNullOrEmpty(forRemoving)) return value;
while (value.EndsWith(forRemoving, StringComparison.InvariantCultureIgnoreCase))
{
value = value.Remove(value.LastIndexOf(forRemoving, StringComparison.InvariantCultureIgnoreCase));
@@ -198,6 +200,8 @@ namespace Umbraco.Core
public static string TrimStart(this string value, string forRemoving)
{
if (string.IsNullOrEmpty(value)) return value;
if (string.IsNullOrEmpty(forRemoving)) return value;
while (value.StartsWith(forRemoving, StringComparison.InvariantCultureIgnoreCase))
{
value = value.Substring(forRemoving.Length);