mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Added a subdir to CP, SickRage, Sonarr and Plex #43
This commit is contained in:
parent
21ea315cd0
commit
895a0c50eb
10 changed files with 86 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
|||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace PlexRequests.Helpers.Tests
|
||||
|
@ -35,7 +36,7 @@ namespace PlexRequests.Helpers.Tests
|
|||
{
|
||||
[TestCaseSource(nameof(UriData))]
|
||||
public void CreateUri1(string uri, Uri expected)
|
||||
{
|
||||
{
|
||||
var result = uri.ReturnUri();
|
||||
|
||||
Assert.That(result, Is.EqualTo(expected));
|
||||
|
@ -58,6 +59,14 @@ namespace PlexRequests.Helpers.Tests
|
|||
Assert.That(result, Is.EqualTo(expected));
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(UriDataWithSubDir))]
|
||||
public void CreateUriWithSubDir(string uri, int port, bool ssl, string subDir, Uri expected)
|
||||
{
|
||||
var result = uri.ReturnUriWithSubDir(port, ssl, subDir);
|
||||
|
||||
Assert.That(result, Is.EqualTo(expected));
|
||||
}
|
||||
|
||||
static readonly object[] UriData =
|
||||
{
|
||||
new object[] { "google.com", new Uri("http://google.com/"), },
|
||||
|
@ -84,5 +93,13 @@ namespace PlexRequests.Helpers.Tests
|
|||
new object[] {"http://www.google.com/id=2", 443, new Uri("http://www.google.com:443/id=2") },
|
||||
new object[] {"https://www.google.com/id=2", 443, new Uri("https://www.google.com:443/id=2") },
|
||||
};
|
||||
|
||||
static readonly object[] UriDataWithSubDir =
|
||||
{
|
||||
new object[] {"www.google.com", 80, false,"test", new Uri("http://www.google.com:80/test"), },
|
||||
new object[] {"www.google.com", 443, false,"test", new Uri("http://www.google.com:443/test") },
|
||||
new object[] {"http://www.google.com", 443, true,"test", new Uri("https://www.google.com:443/test") },
|
||||
new object[] {"https://www.google.com", 443,true,"test", new Uri("https://www.google.com:443/test") },
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue