mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
feat: Adding IcdUriBuilder and UriExtensions classes
This commit is contained in:
parent
1bddca9a06
commit
3f8e2b8df7
6 changed files with 269 additions and 0 deletions
22
ICD.Common.Utils.Tests/Extensions/UriExtensionsTest.cs
Normal file
22
ICD.Common.Utils.Tests/Extensions/UriExtensionsTest.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using ICD.Common.Utils.Extensions;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace ICD.Common.Utils.Tests.Extensions
|
||||
{
|
||||
[TestFixture]
|
||||
public sealed class UriExtensionsTest
|
||||
{
|
||||
[TestCase("http://username:password@test.com/", "username")]
|
||||
public void GetUserName(string uriString, string expected)
|
||||
{
|
||||
Assert.AreEqual(expected, new Uri(uriString).GetUserName());
|
||||
}
|
||||
|
||||
[TestCase("http://username:password@test.com/", "password")]
|
||||
public void GetPassword(string uriString, string expected)
|
||||
{
|
||||
Assert.AreEqual(expected, new Uri(uriString).GetPassword());
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue