mirror of https://github.com/Ombi-app/Ombi
parent
72ce967ee3
commit
f500bf119f
@ -0,0 +1,31 @@
|
||||
using NUnit.Framework;
|
||||
using Ombi.Settings.Settings.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class CustomizationSettingsTests
|
||||
{
|
||||
|
||||
[TestCaseSource(nameof(TestData))]
|
||||
public string AddToUrlTests(string applicationUrl, string append)
|
||||
{
|
||||
var c = new CustomizationSettings
|
||||
{
|
||||
ApplicationUrl = applicationUrl
|
||||
};
|
||||
c.AddToUrl(append);
|
||||
|
||||
return c.ApplicationUrl;
|
||||
}
|
||||
|
||||
public static IEnumerable<TestCaseData> TestData
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData("https://google.com/", "token?").Returns("https://google.com/token?").SetName("ForwardSlash_On_AppUrl_NotOn_Append");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="nunit" Version="3.11.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ombi.Settings\Ombi.Settings.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in new issue