Adds DelegateExtensions + Tests which is used for retrying and is used with the Examine Index Sync

This commit is contained in:
Shannon
2015-08-13 15:19:04 +02:00
parent 9e6a2d8a7c
commit 0ca1807d64
6 changed files with 154 additions and 53 deletions

View File

@@ -24,6 +24,18 @@ namespace Umbraco.Tests.Strings
ShortStringHelperResolver.Reset();
}
[TestCase("hello", "world", false)]
[TestCase("hello", "hello", true)]
[TestCase("hellohellohellohellohellohellohello", "hellohellohellohellohellohellohelloo", false)]
[TestCase("hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello", "hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohelloo", false)]
[TestCase("hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello", "hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello", true)]
public void String_To_Guid(string first, string second, bool result)
{
Console.WriteLine("First: " + first.ToGuid());
Console.WriteLine("Second: " + second.ToGuid());
Assert.AreEqual(result, first.ToGuid() == second.ToGuid());
}
[TestCase("alert('hello');", false)]
[TestCase("~/Test.js", true)]
[TestCase("../Test.js", true)]