close #1
This commit is contained in:
@@ -12,17 +12,28 @@ import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class TestHdrezka {
|
||||
@Test
|
||||
public void test() {
|
||||
public void testNormal() {
|
||||
search(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStrong() {
|
||||
search(true);
|
||||
}
|
||||
|
||||
private void search(boolean strong) {
|
||||
KinoWarez kinoWarez = new Hdrezka();
|
||||
List<Kino> kinoList = new ArrayList<>();
|
||||
|
||||
String titleKino = "рик и морти";
|
||||
kinoWarez.search(titleKino, kinoList);
|
||||
kinoWarez.search(titleKino, kinoList, strong);
|
||||
|
||||
assertTrue(kinoList.size() > 0);
|
||||
|
||||
Kino kino = kinoList.get(0);
|
||||
System.out.printf("\"%s\" (%s)", kino.getName(), kino.getUrl()); //DEBUG
|
||||
// System.out.printf("\"%s\" (%s)", kino.getName(), kino.getUrl()); //DEBUG
|
||||
assertTrue(kino.getName().toLowerCase().contains(titleKino.toLowerCase()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,12 +12,21 @@ import static org.junit.Assert.*;
|
||||
|
||||
public class TestOnlinelife {
|
||||
@Test
|
||||
public void test() {
|
||||
public void testNormal() {
|
||||
search(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStrong() {
|
||||
search(true);
|
||||
}
|
||||
|
||||
private void search(boolean strong) {
|
||||
KinoWarez kinoWarez = new Onlinelife();
|
||||
List<Kino> kinoList = new ArrayList<>();
|
||||
|
||||
String titleKino = "рик и морти";
|
||||
kinoWarez.search(titleKino, kinoList);
|
||||
kinoWarez.search(titleKino, kinoList, strong);
|
||||
|
||||
assertTrue(kinoList.size() > 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user