mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-14 12:15:05 +00:00
feat: Adding IcdUriBuilder and UriExtensions classes
This commit is contained in:
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user