mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Possible special is less aggressive, with tests
This commit is contained in:
@@ -181,6 +181,7 @@
|
||||
<Compile Include="OrganizerTests\BuildFilePathFixture.cs" />
|
||||
<Compile Include="OrganizerTests\GetSeriesFolderFixture.cs" />
|
||||
<Compile Include="ParserTests\AbsoluteEpisodeNumberParserFixture.cs" />
|
||||
<Compile Include="ParserTests\IsPossibleSpecialEpisodeFixture.cs" />
|
||||
<Compile Include="ParserTests\ReleaseGroupParserFixture.cs" />
|
||||
<Compile Include="ParserTests\LanguageParserFixture.cs" />
|
||||
<Compile Include="ParserTests\SeasonParserFixture.cs" />
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.Test.ParserTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class IsPossibleSpecialEpisodeFixture
|
||||
{
|
||||
[Test]
|
||||
public void should_not_treat_files_without_a_series_title_as_a_special()
|
||||
{
|
||||
var parsedEpisodeInfo = new ParsedEpisodeInfo
|
||||
{
|
||||
EpisodeNumbers = new[]{ 7 },
|
||||
SeasonNumber = 1,
|
||||
SeriesTitle = ""
|
||||
};
|
||||
|
||||
parsedEpisodeInfo.IsPossibleSpecialEpisode().Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_true_when_episode_numbers_is_empty()
|
||||
{
|
||||
var parsedEpisodeInfo = new ParsedEpisodeInfo
|
||||
{
|
||||
SeasonNumber = 1,
|
||||
SeriesTitle = ""
|
||||
};
|
||||
|
||||
parsedEpisodeInfo.IsPossibleSpecialEpisode().Should().BeTrue();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user