Fix matches results updater

This commit is contained in:
Julian Arndt
2023-08-14 10:03:44 +02:00
parent 2acc6acafe
commit 23cef6f545
9 changed files with 91 additions and 19 deletions

View File

@@ -35,7 +35,15 @@ public class TippligaGoogleEventManagerTest {
@Test
public void createOrUpdateEventsForMatchdayTippligaTest() {
TLWMatchdaysCreator creator = new TLWMatchdaysCreator(2022, 1, "Tippliga");
TLWMatchdaysCreator creator = new TLWMatchdaysCreator(2024, 1, "Tippliga");
ArrayList<TLWMatchday> matchdays = creator.getMatchdays();
matchdays.forEach(TippligaGoogleEventManager::createOrUpdateEventsForMatchday);
}
@Test
public void createOrUpdateEventsForMatchdaySupercupTest() {
TLWMatchdaysCreator creator = new TLWMatchdaysCreator(2024, 45, "Supercup");
ArrayList<TLWMatchday> matchdays = creator.getMatchdays();
matchdays.forEach(TippligaGoogleEventManager::createOrUpdateEventsForMatchday);
@@ -61,7 +69,7 @@ public class TippligaGoogleEventManagerTest {
@Test
public void createOrUpdateEventsForMatchdayWTLPokalTest() {
TLWMatchdaysCreator creator = new TLWMatchdaysCreator(2022, 48, "WTL-Pokal");
TLWMatchdaysCreator creator = new TLWMatchdaysCreator(2024, 48, "WTL-Pokal");
ArrayList<TLWMatchday> matchdays = creator.getMatchdays();
// createOrUpdateEventsForMatchday(matchdays.get(4));

View File

@@ -6,8 +6,8 @@ public class TLWMatchesResultsUpdaterTest {
@Test
public void updateResultsTest1() {
// TLWMatchesResultsUpdater updater = new TLWMatchesResultsUpdater(2023, 2, "Tippliga");
System.out.println("Done");
return;
TLWMatchesResultsUpdater updater = new TLWMatchesResultsUpdater(2024, 48, "WTL-Pokal");
// updater.applyUpdates();
System.out.println(updater.getBeautifulInfo());
}
}

View File

@@ -4,30 +4,31 @@ import org.junit.Test;
public class TLWMatchesUpdaterFootballTest {
int season = 2024;
@Test
public void getUpdateSqlTest1() {
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2022, 1, "Tippliga");
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, 1, "Tippliga");
String sql = updater.getUpdateSQL();
// System.out.println(sql);
System.out.println(sql);
// System.out.println(updater.getBeautifulInfo());
}
@Test
public void getUpdateSqlTest2() {
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 2, "Tippliga");
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, 2, "Tippliga");
String sql = updater.getUpdateSQL();
// System.out.println(sql);
System.out.println(sql);
// System.out.println(updater.getBeautifulInfo());
}
@Test
public void getUpdateSqlTest48() {
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 48, "WTL-Pokal");
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, 48, "WTL-Pokal");
String sql = updater.getUpdateSQL();
// System.out.println(sql);
System.out.println(sql);
// System.out.println(updater.getBeautifulInfo());
}
}