@ -3,41 +3,11 @@ using FluentAssertions;
using NUnit.Framework ;
using NzbDrone.Core.Qualities ;
namespace NzbDrone.Integration.Test.ApiTests
namespace NzbDrone.Integration.Test.ApiTests .WantedTests
{
[TestFixture]
public class Wanted Fixture : IntegrationTest
public class CutoffUnmet Fixture : IntegrationTest
{
[Test, Order(0)]
public void missing_should_be_empty ( )
{
EnsureNoMovie ( 680 , "Pulp Fiction" ) ;
var result = WantedMissing . GetPaged ( 0 , 15 , "physicalRelease" , "desc" ) ;
result . Records . Should ( ) . BeEmpty ( ) ;
}
[Test, Order(1)]
public void missing_should_have_monitored_items ( )
{
EnsureMovie ( 680 , "Pulp Fiction" , true ) ;
var result = WantedMissing . GetPaged ( 0 , 15 , "physicalRelease" , "desc" ) ;
result . Records . Should ( ) . NotBeEmpty ( ) ;
}
[Test, Order(1)]
public void missing_should_have_movie ( )
{
EnsureMovie ( 680 , "Pulp Fiction" , true ) ;
var result = WantedMissing . GetPaged ( 0 , 15 , "physicalRelease" , "desc" ) ;
result . Records . First ( ) . Title . Should ( ) . Be ( "Pulp Fiction" ) ;
}
[Test, Order(1)]
public void cutoff_should_have_monitored_items ( )
{
@ -45,29 +15,31 @@ namespace NzbDrone.Integration.Test.ApiTests
var movie = EnsureMovie ( 680 , "Pulp Fiction" , true ) ;
EnsureMovieFile ( movie , Quality . SDTV ) ;
var result = WantedCutoffUnmet . GetPaged ( 0 , 15 , "physicalRelease" , "desc" );
var result = WantedCutoffUnmet . GetPaged ( 0 , 15 , "physicalRelease" , "desc" , "monitored" , "true" );
result . Records . Should ( ) . NotBeEmpty ( ) ;
}
[Test, Order(1)]
public void missing _should_not_have_unmonitored_items( )
public void cutoff _should_not_have_unmonitored_items( )
{
EnsureMovie ( 680 , "Pulp Fiction" , false ) ;
EnsureProfileCutoff ( 1 , Quality . HDTV720p ) ;
var movie = EnsureMovie ( 680 , "Pulp Fiction" , false ) ;
EnsureMovieFile ( movie , Quality . SDTV ) ;
var result = WantedMissing . GetPaged ( 0 , 15 , "physicalRelease" , "desc" ) ;
var result = Wanted CutoffUnmet . GetPaged ( 0 , 15 , "physicalRelease" , "desc ", "monitored" , "true ") ;
result . Records . Should ( ) . BeEmpty ( ) ;
}
[Test, Order(1)]
public void cutoff_should_not_have_ unmonito red_items( )
public void cutoff_should_not_have_ releas ed_items( )
{
EnsureProfileCutoff ( 1 , Quality . HDTV720p ) ;
var movie = EnsureMovie ( 680 , "Pulp Fiction" , fals e) ;
var movie = EnsureMovie ( 680 , "Pulp Fiction" , tru e) ;
EnsureMovieFile ( movie , Quality . SDTV ) ;
var result = WantedCutoffUnmet . GetPaged ( 0 , 15 , "physicalRelease" , "desc" );
var result = WantedCutoffUnmet . GetPaged ( 0 , 15 , "physicalRelease" , "desc" , "status" , "inCinemas" );
result . Records . Should ( ) . BeEmpty ( ) ;
}
@ -85,25 +57,27 @@ namespace NzbDrone.Integration.Test.ApiTests
}
[Test, Order(2)]
public void missing _should_have_unmonitored_items( )
public void cutoff _should_have_unmonitored_items( )
{
EnsureMovie ( 680 , "Pulp Fiction" , false ) ;
EnsureProfileCutoff ( 1 , Quality . HDTV720p ) ;
var movie = EnsureMovie ( 680 , "Pulp Fiction" , false ) ;
EnsureMovieFile ( movie , Quality . SDTV ) ;
var result = WantedMissing . GetPaged ( 0 , 15 , "physicalRelease" , "desc" , "monitored" , "false" ) ;
var result = Wanted CutoffUnmet . GetPaged ( 0 , 15 , "physicalRelease" , "desc" , "monitored" , "false" ) ;
result . Records . Should ( ) . NotBeEmpty ( ) ;
}
[Test, Order(2)]
public void cutoff_should_have_ unmonito red_items( )
public void cutoff_should_have_ releas ed_items( )
{
EnsureProfileCutoff ( 1 , Quality . HDTV720p ) ;
var movie = EnsureMovie ( 680 , "Pulp Fiction" , false ) ;
EnsureMovieFile ( movie , Quality . SDTV ) ;
var result = WantedCutoffUnmet . GetPaged ( 0 , 15 , "physicalRelease" , "desc" , " monitored", "false ") ;
var result = WantedCutoffUnmet . GetPaged ( 0 , 15 , "physicalRelease" , "desc" , " status", "released ") ;
result . Records . Should ( ) . NotBeEmpty ( ) ;
}
}
}
}