1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00
Files
Radarr/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/GetMovieFixture.cs
T
Leonardo Galli 77f146b262 Added: Ability to add custom formats, working similar to qualities. (#2669)
Originally called project metis, this feature allows you to do a lot of cool stuff, such as upgrading to a x265 encode, downloading releases with multiple languages, etc. Check out the wiki page at: https://github.com/Radarr/Radarr/wiki/Custom-Formats to learn more! Note: This feature is currently in "beta" and will get more tags and features in the future. Please let me know, if you have any issues and I hope this will allow for a lot of customization!
2018-08-05 16:28:05 +02:00

48 lines
1.5 KiB
C#

using Moq;
using NUnit.Framework;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Movies;
namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests
{
[TestFixture]
public class GetMovieFixture : CoreTest<ParsingService>
{
[Test]
public void should_use_passed_in_title_when_it_cannot_be_parsed()
{
const string title = "30 Rock";
Subject.GetMovie(title);
Mocker.GetMock<IMovieService>()
.Verify(s => s.FindByTitle(title), Times.Once());
}
[Test]
public void should_use_parsed_series_title()
{
const string title = "30.Rock.2015.720p.hdtv";
Subject.GetMovie(title);
Mocker.GetMock<IMovieService>()
.Verify(s => s.FindByTitle(Parser.Parser.ParseMovieTitle(title,false,false).MovieTitle), Times.Once());
}
/*[Test]
public void should_fallback_to_title_without_year_and_year_when_title_lookup_fails()
{
const string title = "House.2004.S01E01.720p.hdtv";
var parsedEpisodeInfo = Parser.Parser.ParseMovieTitle(title,false,false);
Subject.GetMovie(title);
Mocker.GetMock<IMovieService>()
.Verify(s => s.FindByTitle(parsedEpisodeInfo.MovieTitleInfo.TitleWithoutYear,
parsedEpisodeInfo.MovieTitleInfo.Year), Times.Once());
}*/
}
}