You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi.Settings.Tests/CustomizationSettingsTests.cs

33 lines
1.0 KiB

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
};
var result = c.AddToUrl(append);
return result;
}
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");
yield return new TestCaseData("https://google.com", "token?").Returns("https://google.com/token?").SetName("NoForwardSlash_On_AppUrl_NotOn_Append");
yield return new TestCaseData(null, "token?").Returns(null).SetName("NullValue");
}
}
}
}