Add api football files updater

This commit is contained in:
2020-10-07 22:14:13 +02:00
parent bce0f3800c
commit f22f9a929b
18 changed files with 15808 additions and 1048 deletions

View File

@@ -0,0 +1,20 @@
package de.jeyp91.apifootball;
import org.junit.Test;
import java.io.IOException;
public class APIFootballUpdaterTest {
@Test
public void updateFixturesTest() throws IOException {
APIFootballUpdater updater = new APIFootballUpdater(2021);
updater.updateFixtures(2743);
}
@Test
public void updateAllFixturesTest() throws IOException {
APIFootballUpdater updater = new APIFootballUpdater(2021);
updater.updateAllFixtures("Tippliga.json");
}
}

View File

@@ -5,11 +5,20 @@ import org.junit.Test;
public class TLWMatchdayUpdaterTest {
@Test
public void getUpdateSqlTest() throws Exception {
public void getUpdateSqlTest1() throws Exception {
TLWMatchdaysUpdater matchdaysUpdater = new TLWMatchdaysUpdater(2021, 1, "Tippliga.json");
String sql = matchdaysUpdater.getUpdateSql();
System.out.println(sql);
}
@Test
public void getUpdateSqlTest2() throws Exception {
TLWMatchdaysUpdater matchdaysUpdater = new TLWMatchdaysUpdater(2021, 2, "Tippliga.json");
String sql = matchdaysUpdater.getUpdateSql();
System.out.println(sql);
}
}

View File

@@ -5,10 +5,18 @@ import org.junit.Test;
public class TLWMatchesUpdaterFootballTest {
@Test
public void getMatchesTest() throws Exception {
public void getUpdateSqlTest1() throws Exception {
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 1, "Tippliga.json");
String sql = updater.getUpdateSQL();
System.out.println(sql);
}
@Test
public void getUpdateSqlTest2() throws Exception {
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 2, "Tippliga.json");
String sql = updater.getUpdateSQL();
System.out.println(sql);
}
}

View File

@@ -5,7 +5,7 @@ import org.junit.Test;
public class TLWTeamsUpdaterTest {
@Test
public void getTeamsTest() throws Exception {
public void getInsertSQLTest1() throws Exception {
TLWMatchesUpdaterFootball matchesUpdater = new TLWMatchesUpdaterFootball(2021, 1, "Tippliga.json");
TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(2021, 1, matchesUpdater.tlwMatchesUpdated);
@@ -13,4 +13,14 @@ public class TLWTeamsUpdaterTest {
System.out.println(sql);
}
@Test
public void getInsertSQLTest2() throws Exception {
TLWMatchesUpdaterFootball matchesUpdater = new TLWMatchesUpdaterFootball(2021, 2, "Tippliga.json");
TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(2021, 2, matchesUpdater.tlwMatchesUpdated);
String sql = teamsUpdater.getInsertSQL();
System.out.println(sql);
}
}