Search in sources :

Example 1 with CapsSearching

use of org.nzbhydra.mapping.newznab.caps.CapsSearching in project nzbhydra2 by theotherp.

the class NewznabCheckerTest method setUp.

@Before
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    indexerConfig = new IndexerConfig();
    indexerConfig.setHost("http://127.0.0.1:1234");
    indexerConfig.setApiKey("apikey");
    when(searchingConfig.getTimeout()).thenReturn(1);
    when(configProviderMock.getBaseConfig()).thenReturn(baseConfig);
    when(baseConfig.getSearching()).thenReturn(searchingConfig);
    capsRoot = new CapsRoot();
    capsRoot.setSearching(new CapsSearching());
    CapsLimits capsLimits = new CapsLimits(200, 100);
    capsRoot.setLimits(capsLimits);
    when(indexerWebAccess.get(new URI("http://127.0.0.1:1234/api?apikey=apikey&t=caps"), indexerConfig)).thenReturn(capsRoot);
    testee.PAUSE_BETWEEN_CALLS = 0;
}
Also used : CapsRoot(org.nzbhydra.mapping.newznab.caps.CapsRoot) CapsLimits(org.nzbhydra.mapping.newznab.caps.CapsLimits) CapsSearching(org.nzbhydra.mapping.newznab.caps.CapsSearching) URI(java.net.URI) Before(org.junit.Before)

Aggregations

URI (java.net.URI)1 Before (org.junit.Before)1 CapsLimits (org.nzbhydra.mapping.newznab.caps.CapsLimits)1 CapsRoot (org.nzbhydra.mapping.newznab.caps.CapsRoot)1 CapsSearching (org.nzbhydra.mapping.newznab.caps.CapsSearching)1