package pirateboat.multifileHoster;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import pirateboat.torrent.Torrent;
import pirateboat.torrent.TorrentFile;
import pirateboat.utilities.HttpHelper;

import java.util.List;

import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

class AlldebridTest {

    private Alldebrid alldebrid;

    @BeforeEach
    void beforeEach() {
        alldebrid = new Alldebrid(new HttpHelper());
    }

    @Test
    void getRemoteTorrents() {
        // Given
        // When
        final List<Torrent> remoteTorrents = alldebrid.getRemoteTorrents();
        // Then
        assertTrue(remoteTorrents != null);
    }

    @Test
    void getFilesFromTorrent() {
        // Given
        final List<Torrent> remoteTorrents = alldebrid.getRemoteTorrents();
        // When
        final Torrent torrent = remoteTorrents.stream().findFirst().orElse(null);
        if(torrent != null) {
            final List<TorrentFile> filesFromTorrent = alldebrid.getFilesFromTorrent(torrent);
            assertNotNull(filesFromTorrent);
        }
        assertTrue(true);
    }

}
@@ -26,24 +26,48 @@
 ileHoster;%0A%0A
+import java.util.List;%0A%0A
 import org.j
@@ -95,16 +95,55 @@
 reEach;%0A
+import org.junit.jupiter.api.Disabled;%0A
 import o
@@ -288,32 +288,8 @@
 r;%0A%0A
-import java.util.List;%0A%0A
 impo
@@ -555,32 +555,46 @@
 lper());%0A    %7D%0A%0A
+    @Disabled%0A
     @Test%0A    vo
@@ -790,24 +790,38 @@
 ll);%0A    %7D%0A%0A
+    @Disabled%0A
     @Test%0A  

disable AD tests for now