@ -19,6 +19,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
private NzbgetQueueItem _queued ;
private NzbgetHistoryItem _failed ;
private NzbgetHistoryItem _completed ;
private Dictionary < string , string > _configItems ;
[SetUp]
public void Setup ( )
@ -80,13 +81,18 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
DownloadRate = 7000000
} ) ;
var configItems = new Dictionary < string , string > ( ) ;
configItems . Add ( "Category1.Name" , "tv" ) ;
configItems . Add ( "Category1.DestDir" , @"/remote/mount/tv" ) ;
Mocker . GetMock < INzbgetProxy > ( )
. Setup ( v = > v . GetVersion ( It . IsAny < NzbgetSettings > ( ) ) )
. Returns ( "14.0" ) ;
_configItems = new Dictionary < string , string > ( ) ;
_configItems . Add ( "Category1.Name" , "tv" ) ;
_configItems . Add ( "Category1.DestDir" , @"/remote/mount/tv" ) ;
Mocker . GetMock < INzbgetProxy > ( )
. Setup ( v = > v . GetConfig ( It . IsAny < NzbgetSettings > ( ) ) )
. Returns ( configItems ) ;
. Returns ( _ configItems) ;
}
protected void GivenFailedDownload ( )
@ -421,9 +427,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
[TestCase("5000000", false)]
public void should_test_keephistory ( string keephistory , bool expected )
{
Mocker . GetMock < INzbgetProxy > ( )
. Setup ( v = > v . GetConfig ( It . IsAny < NzbgetSettings > ( ) ) )
. Returns ( new Dictionary < string , string > { { "KeepHistory" , keephistory } } ) ;
_configItems [ "KeepHistory" ] = keephistory ;
var error = Subject . Test ( ) ;