Updates for season 2022

This commit is contained in:
Julian Arndt
2021-07-19 15:05:48 +02:00
parent c959d62116
commit 2f0385f1f5
16 changed files with 251 additions and 84 deletions

View File

@@ -9,10 +9,12 @@ import static org.junit.Assert.assertEquals;
public class TLWMatchdaysCreatorTest {
int season = 2022;
@Test
public void getMatchdaysTippligaTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 1, "Tippliga");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 1, "Tippliga");
ArrayList<TLWMatchday> matchdays = matchdaysCreator.getMatchdays();
assertEquals((Integer) 1, matchdays.get(0).getMatchday());
@@ -20,7 +22,7 @@ public class TLWMatchdaysCreatorTest {
@Test
public void getMatchdaysWTLPokalTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 1, "WTL-Pokal");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 1, "WTL-Pokal");
ArrayList<TLWMatchday> matchdays = matchdaysCreator.getMatchdays();
assertEquals((Integer) 1, matchdays.get(0).getMatchday());
@@ -29,49 +31,49 @@ public class TLWMatchdaysCreatorTest {
@Test
public void getMatchdaysTippliga1SqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 1, "Tippliga");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 1, "Tippliga");
String sql = matchdaysCreator.getMatchdaysSQL();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getMatchdaysTippliga2SqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 2, "Tippliga");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 2, "Tippliga");
String sql = matchdaysCreator.getMatchdaysSQL();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getMatchdaysTippliga51SqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 51, "Tippliga");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 51, "Tippliga");
String sql = matchdaysCreator.getMatchdaysSQL();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getMatchdaysTippliga52SqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 52, "Tippliga");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 52, "Tippliga");
String sql = matchdaysCreator.getMatchdaysSQL();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getMatchdaysWTLPokal48SqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 48, "WTL-Pokal");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 48, "WTL-Pokal");
String sql = matchdaysCreator.getMatchdaysSQL();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getMatchdaysWTLPokal98SqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 98, "WTL-Pokal");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 98, "WTL-Pokal");
String sql = matchdaysCreator.getMatchdaysSQL();
// System.out.println(sql);
System.out.println(sql);
}
@Test

View File

@@ -8,6 +8,8 @@ import static org.junit.Assert.assertEquals;
public class TLWMatchesCreatorFootballTest {
int season = 2022;
@Test
public void getMatchesTest() {
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(2021, 1, "WTL-Pokal");
@@ -19,17 +21,24 @@ public class TLWMatchesCreatorFootballTest {
}
@Test
public void getMatchesTippligaSqlTest() {
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(2021, 2, "Tippliga");
public void getMatchesTippliga1SqlTest() {
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(season, 1, "Tippliga");
String sql = creator.getSQLInsertString();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getMatchesTippliga2SqlTest() {
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(season, 2, "Tippliga");
String sql = creator.getSQLInsertString();
System.out.println(sql);
}
@Test
public void getMatchesWTLPokalSqlTest() {
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(2021, 48, "WTL-Pokal");
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(season, 48, "WTL-Pokal");
String sql = creator.getSQLInsertString();
// System.out.println(sql);
System.out.println(sql);
}
@Test

View File

@@ -2,17 +2,15 @@ package de.jeyp91.tippliga;
import org.junit.Test;
import java.text.ParseException;
public class TLWMatchesCreatorTipperPokalTest {
@Test
public void getMatchesWTLPokalTest() throws ParseException {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 48, "WTL-Pokal");
public void getMatchesWTLPokalTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2022, 48, "WTL-Pokal");
TLWMatchesCreatorTipperPokal creator = new TLWMatchesCreatorTipperPokal(2021, 98, "WTL-Pokal Tipper", matchdaysCreator.getMatchdays());
TLWMatchesCreatorTipperPokal creator = new TLWMatchesCreatorTipperPokal(2022, 98, "WTL-Pokal Tipper", matchdaysCreator.getMatchdays());
String sql = creator.getSQLInsertString();
// System.out.println(sql);
System.out.println(sql);
}
}

View File

@@ -8,13 +8,25 @@ import static org.junit.Assert.assertEquals;
public class TLWMatchesCreatorTipperTest {
@Test
public void getMatchesTippligaTest() throws ParseException {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 2, "Tippliga");
int season = 2022;
TLWMatchesCreatorTipperLeague creator = new TLWMatchesCreatorTipperLeague(2021, 52, "2. Tippliga Tipper", matchdaysCreator.getMatchdays());
@Test
public void getMatchesTippliga1Test() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 1, "Tippliga");
TLWMatchesCreatorTipperLeague creator = new TLWMatchesCreatorTipperLeague(season, 51, "1. Tippliga Tipper", matchdaysCreator.getMatchdays());
String sql = creator.getSQLInsertString();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getMatchesTippliga2Test() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 2, "Tippliga");
TLWMatchesCreatorTipperLeague creator = new TLWMatchesCreatorTipperLeague(season, 52, "2. Tippliga Tipper", matchdaysCreator.getMatchdays());
String sql = creator.getSQLInsertString();
System.out.println(sql);
}
}

View File

@@ -8,14 +8,37 @@ import java.util.ArrayList;
import static org.junit.Assert.assertEquals;
public class TLWTeamsCreatorTest {
int season = 2022;
@Test
public void getTeamsTippligaFootball1Test() {
TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(2021, 1, "Tippliga");
TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(season, 1, "Tippliga");
ArrayList<TLWMatch> matches = matchesCreator.getMatches();
TLWTeamsCreator teamCreator = new TLWTeamsCreator(2021, 1, matches);
TLWTeamsCreator teamCreator = new TLWTeamsCreator(season, 1, matches);
String sql = teamCreator.getSql();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getTeamsTippligaFootball2Test() {
TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(season, 2, "Tippliga");
ArrayList<TLWMatch> matches = matchesCreator.getMatches();
TLWTeamsCreator teamCreator = new TLWTeamsCreator(season, 2, matches);
String sql = teamCreator.getSql();
System.out.println(sql);
}
@Test
public void getTeamsWTLPokalTest() {
TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(season, 48, "WTL-Pokal");
ArrayList<TLWMatch> matches = matchesCreator.getMatches();
TLWTeamsCreator teamCreator = new TLWTeamsCreator(season, 48, matches);
String sql = teamCreator.getSql();
System.out.println(sql);
}
@Test
@@ -30,40 +53,40 @@ public class TLWTeamsCreatorTest {
@Test
public void getTeamsTipper1TLTest() throws ParseException {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 1, "Tippliga");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 1, "Tippliga");
TLWMatchesCreatorTipperLeague creator = new TLWMatchesCreatorTipperLeague(2021, 51, "1. Tippliga Tipper", matchdaysCreator.getMatchdays());
TLWMatchesCreatorTipperLeague creator = new TLWMatchesCreatorTipperLeague(season, 51, "1. Tippliga Tipper", matchdaysCreator.getMatchdays());
ArrayList<TLWMatch> matches = creator.getMatches();
TLWTeamsCreator teamCreator = new TLWTeamsCreator(2021, 51, matches);
TLWTeamsCreator teamCreator = new TLWTeamsCreator(season, 51, matches);
String sql = teamCreator.getSql();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getTeamsTipper2TLTest() throws ParseException {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 2, "Tippliga");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 2, "Tippliga");
TLWMatchesCreatorTipperLeague creator = new TLWMatchesCreatorTipperLeague(2021, 52, "2. Tippliga Tipper", matchdaysCreator.getMatchdays());
TLWMatchesCreatorTipperLeague creator = new TLWMatchesCreatorTipperLeague(season, 52, "2. Tippliga Tipper", matchdaysCreator.getMatchdays());
ArrayList<TLWMatch> matches = creator.getMatches();
TLWTeamsCreator teamCreator = new TLWTeamsCreator(2021, 52, matches);
TLWTeamsCreator teamCreator = new TLWTeamsCreator(season, 52, matches);
String sql = teamCreator.getSql();
// System.out.println(sql);
System.out.println(sql);
}
@Test
public void getTeamsTipperWTLTest() throws ParseException {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 48, "WTL-Pokal");
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 48, "WTL-Pokal");
TLWMatchesCreatorTipperPokal creator = new TLWMatchesCreatorTipperPokal(2021, 98, "WTL-Pokal Tipper", matchdaysCreator.getMatchdays());
TLWMatchesCreatorTipperPokal creator = new TLWMatchesCreatorTipperPokal(season, 98, "WTL-Pokal Tipper", matchdaysCreator.getMatchdays());
ArrayList<TLWMatch> matches = creator.getMatches();
TLWTeamsCreator teamCreator = new TLWTeamsCreator(2021, 98, matches);
TLWTeamsCreator teamCreator = new TLWTeamsCreator(season, 98, matches);
String sql = teamCreator.getSql();
// System.out.println(sql);
System.out.println(sql);
}
}

View File

@@ -1,21 +1,18 @@
package de.jeyp91.tippligaforum;
import de.jeyp91.tippligaforum.MatchesListForumUpdater;
import org.junit.Test;
import java.io.UnsupportedEncodingException;
public class MatchesListForumUpdaterTest {
@Test
public void updateAllLeaguesTest() {
MatchesListForumUpdater updater = new MatchesListForumUpdater();
// updater.updateAllLeagues();
MatchesListForumUpdater updater = new MatchesListForumUpdater(2022);
// updater.updateAllLeagues(2022);
}
@Test
public void updateLeagueTest() {
MatchesListForumUpdater updater = new MatchesListForumUpdater();
updater.updateLeague(2743);
MatchesListForumUpdater updater = new MatchesListForumUpdater(2022);
updater.updateLeague(2022, 3509);
}
}