mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
Attempt at fixing a potential bug found from #466
This commit is contained in:
parent
f098e0355e
commit
a7d5378426
11 changed files with 222 additions and 133 deletions
|
@ -55,6 +55,11 @@ namespace PlexRequests.Helpers.Tests
|
|||
return list;
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(SeasonNumbers))]
|
||||
public int TitleToSeasonNumber(string title)
|
||||
{
|
||||
return PlexHelper.GetSeasonNumberFromTitle(title);
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> PlexGuids
|
||||
{
|
||||
|
@ -70,6 +75,23 @@ namespace PlexRequests.Helpers.Tests
|
|||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> SeasonNumbers
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData("Season 1").Returns(1).SetName("Season 1");
|
||||
yield return new TestCaseData("Season 2").Returns(2).SetName("Season 2");
|
||||
yield return new TestCaseData("Season 3").Returns(3).SetName("Season 3");
|
||||
yield return new TestCaseData("Season 4").Returns(4).SetName("Season 4");
|
||||
yield return new TestCaseData("Season 5").Returns(5).SetName("Season 5");
|
||||
yield return new TestCaseData("Season 100").Returns(100).SetName("Season 100");
|
||||
yield return new TestCaseData("InvalidSeason").Returns(0).SetName("InvalidSeason");
|
||||
yield return new TestCaseData("Invalid Season with no number").Returns(0).SetName("Invalid Season with no number");
|
||||
yield return new TestCaseData("").Returns(0).SetName("Empty string");
|
||||
yield return new TestCaseData(null).Returns(0).SetName("Null string");
|
||||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> PlexTvEpisodeGuids
|
||||
{
|
||||
get
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue