mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
feat: Added GetParentUri method to UriExtensions
This commit is contained in:
@@ -18,5 +18,13 @@ namespace ICD.Common.Utils.Tests.Extensions
|
||||
{
|
||||
Assert.AreEqual(expected, new Uri(uriString).GetPassword());
|
||||
}
|
||||
|
||||
[TestCase("http://www.test.com/a/b/c", "http://www.test.com/a/b/")]
|
||||
[TestCase("http://www.test.com/a/b/", "http://www.test.com/a/")]
|
||||
[TestCase("http://www.test.com/", "http://www.test.com/")]
|
||||
public void GetParentUri(string uriString, string expected)
|
||||
{
|
||||
Assert.AreEqual(expected, new Uri(uriString).GetParentUri().ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user