@ -237,15 +237,16 @@ namespace NzbDrone.Core.Test
result . Should ( ) . NotBeEmpty ( ) ;
result . Should ( ) . NotBeEmpty ( ) ;
}
}
[Test]
[TestCase("simpsons", 21, 23)]
public void nzbmatrix_search_returns_valid_results ( )
[TestCase("The walking dead", 2, 10)]
public void nzbmatrix_search_returns_valid_results ( string title , int season , int episode )
{
{
WithConfiguredIndexers ( ) ;
WithConfiguredIndexers ( ) ;
Mocker . Resolve < HttpProvider > ( ) ;
Mocker . Resolve < HttpProvider > ( ) ;
var result = Mocker . Resolve < NzbMatrix > ( ) . FetchEpisode ( "Simpsons" , 21 , 23 ) ;
var result = Mocker . Resolve < NzbMatrix > ( ) . FetchEpisode ( title , season , episode ) ;
Mark500Inconclusive ( ) ;
Mark500Inconclusive ( ) ;
@ -253,6 +254,7 @@ namespace NzbDrone.Core.Test
}
}
[Test]
[Test]
public void nzbmatrix_multi_word_search_returns_valid_results ( )
public void nzbmatrix_multi_word_search_returns_valid_results ( )
{
{
@ -275,7 +277,7 @@ namespace NzbDrone.Core.Test
public void get_query_title ( string raw , string clean )
public void get_query_title ( string raw , string clean )
{
{
var mock = new Mock < IndexerBase > ( ) ;
var mock = new Mock < IndexerBase > ( ) ;
mock . CallBase = true ;
mock . CallBase = true ;
var result = mock . Object . GetQueryTitle ( raw ) ;
var result = mock . Object . GetQueryTitle ( raw ) ;
result . Should ( ) . Be ( clean ) ;
result . Should ( ) . Be ( clean ) ;
}
}
@ -387,7 +389,7 @@ namespace NzbDrone.Core.Test
public void indexer_that_isnt_configured_shouldnt_make_an_http_call ( )
public void indexer_that_isnt_configured_shouldnt_make_an_http_call ( )
{
{
Mocker . Resolve < NotConfiguredIndexer > ( ) . FetchRss ( ) ;
Mocker . Resolve < NotConfiguredIndexer > ( ) . FetchRss ( ) ;
Mocker . GetMock < HttpProvider > ( )
Mocker . GetMock < HttpProvider > ( )
. Verify ( c = > c . DownloadFile ( It . IsAny < string > ( ) , It . IsAny < string > ( ) ) , Times . Never ( ) ) ;
. Verify ( c = > c . DownloadFile ( It . IsAny < string > ( ) , It . IsAny < string > ( ) ) , Times . Never ( ) ) ;