Rework Google Auth and add Supercup

This commit is contained in:
2022-08-05 13:25:26 +02:00
parent f5ef53aefd
commit 63ff6838de
12 changed files with 87 additions and 42 deletions

View File

@@ -51,7 +51,7 @@ public class TippligaGoogleEventManagerTest {
public void updateEventTest() {
List<Event> allEvents = getAllEvents(2023);
Event event = findEvent(allEvents, 2023, 1, 1, 1);
TLWMatchday matchday = new TLWMatchday(2023, 1, 1, 0, "2022-08-05 20:30:00", "", "", "1. Spieltag", 12);
TLWMatchday matchday = new TLWMatchday(2023, 1, 1, 0, "2022-08-06 20:30:00", "", "", "1. Spieltag", 12);
updateEvent(event, matchday, matchday.getDeliveryDate(), 1);
assertEquals(event.size(), 18);
}
@@ -67,7 +67,7 @@ public class TippligaGoogleEventManagerTest {
@Test
public void createOrUpdateEventTest() {
TLWMatchday matchday = new TLWMatchday(2023, 1, 1, 0, "2022-08-06 20:30:00", "", "", "1. Spieltag", 12);
TLWMatchday matchday = new TLWMatchday(2023, 1, 1, 0, "2022-08-05 20:30:00", "", "", "1. Spieltag", 12);
createOrUpdateEvent(matchday, matchday.getDeliveryDate(), 1);
}

View File

@@ -76,6 +76,22 @@ public class TLWMatchdaysCreatorTest {
System.out.println(sql);
}
@Test
public void getMatchdaysSupercup45SqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 45, "Supercup");
String sql = matchdaysCreator.getMatchdaysSQL();
System.out.println(sql);
}
@Test
public void getMatchdaysSupercup95SqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 95, "Supercup");
String sql = matchdaysCreator.getMatchdaysSQL();
System.out.println(sql);
}
@Test
public void getMatchdaysEMTippspielSqlTest() {

View File

@@ -41,6 +41,13 @@ public class TLWMatchesCreatorFootballTest {
System.out.println(sql);
}
@Test
public void getMatchesSupercupSqlTest() {
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(season, 45, "Supercup");
String sql = creator.getSQLInsertString();
System.out.println(sql);
}
@Test
public void getMatchesEMTippspielSqlTest() {
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(2021, 49, "EM-Tippspiel");

View File

@@ -15,4 +15,14 @@ public class TLWMatchesCreatorTipperPokalTest {
String sql = creator.getSQLInsertString();
System.out.println(sql);
}
@Test
public void getMatchesSupercupTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 45, "Supercup");
TLWMatchesCreatorTipperPokal creator = new TLWMatchesCreatorTipperPokal(season, 95, "Supercup Tipper", matchdaysCreator.getMatchdays());
String sql = creator.getSQLInsertString();
System.out.println(sql);
}
}

View File

@@ -41,6 +41,16 @@ public class TLWTeamsCreatorTest {
System.out.println(sql);
}
@Test
public void getTeamsTippligaSupercupTest() {
TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(season, 45, "Supercup");
ArrayList<TLWMatch> matches = matchesCreator.getMatches();
TLWTeamsCreator teamCreator = new TLWTeamsCreator(season, 45, matches);
String sql = teamCreator.getSql();
System.out.println(sql);
}
@Test
public void getTeamsTippligaEMTippspielTest() {
TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(2021, 49, "EM-Tippspiel");
@@ -89,4 +99,18 @@ public class TLWTeamsCreatorTest {
String sql = teamCreator.getSql();
System.out.println(sql);
}
@Test
public void getTeamsTipperSupercupTest() {
int leagueId = 45;
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, leagueId, "Supercup");
TLWMatchesCreatorTipperPokal creator = new TLWMatchesCreatorTipperPokal(season, leagueId + 50, "Supercup Tipper", matchdaysCreator.getMatchdays());
ArrayList<TLWMatch> matches = creator.getMatches();
TLWTeamsCreator teamCreator = new TLWTeamsCreator(season, leagueId + 50, matches);
String sql = teamCreator.getSql();
System.out.println(sql);
}
}