Add beautiful output
This commit is contained in:
@@ -5,9 +5,10 @@ import net.sourceforge.argparse4j.ArgumentParsers;
|
|||||||
import net.sourceforge.argparse4j.inf.ArgumentParser;
|
import net.sourceforge.argparse4j.inf.ArgumentParser;
|
||||||
import net.sourceforge.argparse4j.inf.ArgumentParserException;
|
import net.sourceforge.argparse4j.inf.ArgumentParserException;
|
||||||
import net.sourceforge.argparse4j.inf.Namespace;
|
import net.sourceforge.argparse4j.inf.Namespace;
|
||||||
|
import org.apache.logging.log4j.Level;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.apache.logging.log4j.ThreadContext;
|
import org.apache.logging.log4j.core.config.Configurator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hello world!
|
* Hello world!
|
||||||
@@ -22,13 +23,15 @@ public class App {
|
|||||||
private static Logger logger = LogManager.getLogger(App.class);
|
private static Logger logger = LogManager.getLogger(App.class);
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ThreadContext.put("myLogLvl", "INFO");
|
Configurator.setRootLevel(Level.INFO);
|
||||||
initOptions(args);
|
initOptions(args);
|
||||||
String sql = "";
|
String sql = "";
|
||||||
|
String beautifulInfo = "";
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
case "MatchdaysUpdater":
|
case "MatchdaysUpdater":
|
||||||
TLWMatchdaysUpdater matchdaysUpdater = new TLWMatchdaysUpdater(season, league, configFile);
|
TLWMatchdaysUpdater matchdaysUpdater = new TLWMatchdaysUpdater(season, league, configFile);
|
||||||
sql = matchdaysUpdater.getUpdateSql();
|
sql = matchdaysUpdater.getUpdateSql();
|
||||||
|
beautifulInfo = matchdaysUpdater.getBeautifulInfo();
|
||||||
break;
|
break;
|
||||||
case "MatchesCreatorFootball":
|
case "MatchesCreatorFootball":
|
||||||
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(season, league, configFile);
|
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(season, league, configFile);
|
||||||
@@ -37,6 +40,7 @@ public class App {
|
|||||||
case "MatchesUpdaterFootball":
|
case "MatchesUpdaterFootball":
|
||||||
TLWMatchesUpdaterFootball tlwMatchesUpdaterFootball = new TLWMatchesUpdaterFootball(season, league, configFile);
|
TLWMatchesUpdaterFootball tlwMatchesUpdaterFootball = new TLWMatchesUpdaterFootball(season, league, configFile);
|
||||||
sql = tlwMatchesUpdaterFootball.getUpdateSQL();
|
sql = tlwMatchesUpdaterFootball.getUpdateSQL();
|
||||||
|
beautifulInfo = tlwMatchesUpdaterFootball.getBeautifulInfo();
|
||||||
break;
|
break;
|
||||||
case "TeamsUpdater":
|
case "TeamsUpdater":
|
||||||
TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(season, league, configFile);
|
TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(season, league, configFile);
|
||||||
@@ -47,17 +51,11 @@ public class App {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (sql.equals("")) {
|
|
||||||
logger.info("No updates for season " + season + ", league " + league + ", config " + configFile);
|
|
||||||
} else {
|
|
||||||
logger.info("Executed query:\n" + sql);
|
|
||||||
}
|
|
||||||
if(!StatusHolder.getError() && !sql.equals("")) {
|
if(!StatusHolder.getError() && !sql.equals("")) {
|
||||||
TippligaSQLConnector con = new TippligaSQLConnector();
|
TippligaSQLConnector con = new TippligaSQLConnector();
|
||||||
// con.executeUpdate(sql);
|
// con.executeUpdate(sql);
|
||||||
|
logger.info(beautifulInfo);
|
||||||
}
|
}
|
||||||
logger.error("testerror");
|
|
||||||
logger.info("testinfo");
|
|
||||||
if(StatusHolder.getError()) {
|
if(StatusHolder.getError()) {
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ public abstract class BaseMatch {
|
|||||||
|
|
||||||
protected Integer teamIdHome;
|
protected Integer teamIdHome;
|
||||||
protected Integer teamIdGuest;
|
protected Integer teamIdGuest;
|
||||||
|
protected String teamNameHome = null;
|
||||||
|
protected String teamNameGuest = null;
|
||||||
protected Integer goalsHome = null;
|
protected Integer goalsHome = null;
|
||||||
protected Integer goalsGuest = null;
|
protected Integer goalsGuest = null;
|
||||||
protected Integer matchday = null;
|
protected Integer matchday = null;
|
||||||
@@ -37,4 +39,12 @@ public abstract class BaseMatch {
|
|||||||
public Integer getGoalsGuest() {
|
public Integer getGoalsGuest() {
|
||||||
return this.goalsGuest;
|
return this.goalsGuest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTeamNameHome() {
|
||||||
|
return this.teamNameHome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTeamNameGuest() {
|
||||||
|
return this.teamNameGuest;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
package de.jeyp91;
|
package de.jeyp91;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import com.google.common.collect.HashBiMap;
|
import com.google.common.collect.HashBiMap;
|
||||||
import com.google.common.io.Resources;
|
|
||||||
import de.jeyp91.gists.GistProvider;
|
import de.jeyp91.gists.GistProvider;
|
||||||
import org.apache.logging.log4j.*;
|
import org.apache.logging.log4j.*;
|
||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
@@ -14,28 +9,31 @@ import org.json.simple.JSONObject;
|
|||||||
public class TeamIDMatcher {
|
public class TeamIDMatcher {
|
||||||
|
|
||||||
private static HashBiMap<Integer, Integer> ids = null;
|
private static HashBiMap<Integer, Integer> ids = null;
|
||||||
private static Logger logger = LogManager.getLogger(TeamIDMatcher.class);
|
private static final Logger logger = LogManager.getLogger(TeamIDMatcher.class);
|
||||||
|
private static JSONArray teams;
|
||||||
|
private static boolean init = false;
|
||||||
|
|
||||||
private static void initBiMap() {
|
private static void initBiMap() {
|
||||||
ids = HashBiMap.create();
|
if(!init) {
|
||||||
GistProvider prov = GistProvider.getInstance();
|
ids = HashBiMap.create();
|
||||||
JSONArray teams = prov.getTeamIdMatcher();
|
GistProvider prov = GistProvider.getInstance();
|
||||||
|
teams = prov.getTeamIdMatcher();
|
||||||
for(Object team:teams) {
|
|
||||||
int tippligaID = ((Long)((JSONObject) team).get("tippligaID")).intValue();
|
for (Object team : teams) {
|
||||||
int openligaDBID = ((Long) ((JSONObject) team).get("apiFootballID")).intValue();
|
int tippligaID = ((Long) ((JSONObject) team).get("tippligaID")).intValue();
|
||||||
ids.put(tippligaID, openligaDBID);
|
int apiFootballID = ((Long) ((JSONObject) team).get("apiFootballID")).intValue();
|
||||||
|
ids.put(tippligaID, apiFootballID);
|
||||||
|
}
|
||||||
|
init = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Integer getApiFootballIdFromTippligaId(int id) {
|
public static Integer getApiFootballIdFromTippligaId(int id) {
|
||||||
if(ids == null) {
|
initBiMap();
|
||||||
initBiMap();
|
|
||||||
}
|
|
||||||
if(ids.containsKey(id)) {
|
if(ids.containsKey(id)) {
|
||||||
return ids.get(id);
|
return ids.get(id);
|
||||||
} else {
|
} else {
|
||||||
logger.error("Tippliga ID: " + String.valueOf(id) + " not in ID Matcher.");
|
logger.error("Tippliga ID: " + id + " not in ID Matcher.");
|
||||||
StatusHolder.setError();
|
StatusHolder.setError();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -43,15 +41,26 @@ public class TeamIDMatcher {
|
|||||||
|
|
||||||
public static Integer getTippligaIdFromApiFootballId(Integer id) {
|
public static Integer getTippligaIdFromApiFootballId(Integer id) {
|
||||||
if(id == null) return null;
|
if(id == null) return null;
|
||||||
if(ids == null) {
|
initBiMap();
|
||||||
initBiMap();
|
|
||||||
}
|
|
||||||
if(ids.inverse().containsKey(id)) {
|
if(ids.inverse().containsKey(id)) {
|
||||||
return ids.inverse().get(id);
|
return ids.inverse().get(id);
|
||||||
} else {
|
} else {
|
||||||
logger.error("API Football ID: " + String.valueOf(id) + " not in ID Matcher.");
|
logger.error("API Football ID: " + id + " not in ID Matcher.");
|
||||||
StatusHolder.setError();
|
StatusHolder.setError();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getTeamNameFromTippligaId(Integer id) {
|
||||||
|
initBiMap();
|
||||||
|
String name = "";
|
||||||
|
for(Object team:teams) {
|
||||||
|
int tippligaID = ((Long)((JSONObject) team).get("tippligaID")).intValue();
|
||||||
|
if(id == tippligaID) {
|
||||||
|
name = (((JSONObject) team).get("teamname")).toString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -125,6 +125,8 @@ public class TLWMatch extends BaseMatch{
|
|||||||
this.formulaGuest = "";
|
this.formulaGuest = "";
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.koMatch = koMatch;
|
this.koMatch = koMatch;
|
||||||
|
this.teamNameHome = apiFootballMatch.getTeamNameHome();
|
||||||
|
this.teamNameGuest = apiFootballMatch.getTeamNameGuest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TLWMatch(int season, int league, int matchday, int matchNo, String matchDatetime, int status, int koMatch) {
|
public TLWMatch(int season, int league, int matchday, int matchNo, String matchDatetime, int status, int koMatch) {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package de.jeyp91.tippliga;
|
package de.jeyp91.tippliga;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -14,6 +12,7 @@ public class TLWMatchdaysUpdater {
|
|||||||
int league;
|
int league;
|
||||||
ArrayList<TLWMatchday> matchdaysOriginal;
|
ArrayList<TLWMatchday> matchdaysOriginal;
|
||||||
ArrayList<TLWMatchday> matchdaysUpdated;
|
ArrayList<TLWMatchday> matchdaysUpdated;
|
||||||
|
String beautifulInfo = "";
|
||||||
|
|
||||||
public TLWMatchdaysUpdater(int season, int league, String configPath) throws ParseException {
|
public TLWMatchdaysUpdater(int season, int league, String configPath) throws ParseException {
|
||||||
this.season = season;
|
this.season = season;
|
||||||
@@ -58,27 +57,40 @@ public class TLWMatchdaysUpdater {
|
|||||||
String condition = "WHERE season = " + matchdayOriginal.getSeason() + " " +
|
String condition = "WHERE season = " + matchdayOriginal.getSeason() + " " +
|
||||||
"AND league = " + matchdayOriginal.getLeague() + " " +
|
"AND league = " + matchdayOriginal.getLeague() + " " +
|
||||||
"AND matchday = " + matchdayOriginal.getMatchday() + ";\n";
|
"AND matchday = " + matchdayOriginal.getMatchday() + ";\n";
|
||||||
|
String beautifulInfoStart = "Aktualisiere Saison " + matchdayOriginal.getSeason() + ", " +
|
||||||
|
"Liga " + matchdayOriginal.getLeague() + ", " +
|
||||||
|
"Spieltag " + matchdayOriginal.getMatchday() + ", ";
|
||||||
|
|
||||||
if (!matchdayOriginal.getDeliveryDate().equals(matchdayUpdated.getDeliveryDate())) {
|
if (!matchdayOriginal.getDeliveryDate().equals(matchdayUpdated.getDeliveryDate())) {
|
||||||
updateSql += updateStart +
|
updateSql += updateStart +
|
||||||
"delivery_date = '" + matchdayUpdated.getDeliveryDate() + "' " +
|
"delivery_date = '" + matchdayUpdated.getDeliveryDate() + "' " +
|
||||||
condition;
|
condition;
|
||||||
|
this.beautifulInfo += beautifulInfoStart +
|
||||||
|
"Tippabgabeschluss 1 zu '" + matchdayUpdated.getDeliveryDate() + "'.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!matchdayOriginal.getDeliveryDate2().equals(matchdayUpdated.getDeliveryDate2())) {
|
if (!matchdayOriginal.getDeliveryDate2().equals(matchdayUpdated.getDeliveryDate2())) {
|
||||||
updateSql += updateStart +
|
updateSql += updateStart +
|
||||||
"delivery_date_2 = '" + matchdayUpdated.getDeliveryDate2() + "' " +
|
"delivery_date_2 = '" + matchdayUpdated.getDeliveryDate2() + "' " +
|
||||||
condition;
|
condition;
|
||||||
|
this.beautifulInfo += beautifulInfoStart +
|
||||||
|
"Tippabgabeschluss 2 zu '" + matchdayUpdated.getDeliveryDate2() + "'.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!matchdayOriginal.getMatchdayName().equals(matchdayUpdated.getMatchdayName())) {
|
if (!matchdayOriginal.getMatchdayName().equals(matchdayUpdated.getMatchdayName())) {
|
||||||
updateSql += updateStart +
|
updateSql += updateStart +
|
||||||
"matchday_name = '" + matchdayUpdated.getMatchdayName() + "' " +
|
"matchday_name = '" + matchdayUpdated.getMatchdayName() + "' " +
|
||||||
condition;
|
condition;
|
||||||
|
this.beautifulInfo += beautifulInfoStart +
|
||||||
|
"Spieltagsname zu '" + matchdayUpdated.getMatchdayName() + "'.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return updateSql;
|
return updateSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBeautifulInfo() {
|
||||||
|
return this.beautifulInfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
|
||||||
|
import javax.sound.midi.SysexMessage;
|
||||||
import java.time.*;
|
import java.time.*;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -21,8 +22,9 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
ArrayList<TLWMatch> tlwMatchesOriginal;
|
ArrayList<TLWMatch> tlwMatchesOriginal;
|
||||||
ArrayList<TLWMatch> tlwMatchesUpdated;
|
ArrayList<TLWMatch> tlwMatchesUpdated;
|
||||||
|
|
||||||
public TLWMatchesUpdaterFootball(int season, int league, String configFileName) {
|
String beautifulInfo = "";
|
||||||
|
|
||||||
|
public TLWMatchesUpdaterFootball(int season, int league, String configFileName) {
|
||||||
this.season = season;
|
this.season = season;
|
||||||
this.league = league;
|
this.league = league;
|
||||||
|
|
||||||
@@ -79,29 +81,42 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
"AND league = " + matchOriginal.getLeague() + " " +
|
"AND league = " + matchOriginal.getLeague() + " " +
|
||||||
"AND matchday = " + matchOriginal.getMatchday() + " " +
|
"AND matchday = " + matchOriginal.getMatchday() + " " +
|
||||||
"AND match_no = " + matchOriginal.getMatchNo() + ";\n";
|
"AND match_no = " + matchOriginal.getMatchNo() + ";\n";
|
||||||
|
String beautifulInfoStart = "Aktualisiere Saison " + matchOriginal.getSeason() + ", " +
|
||||||
|
"Liga " + matchOriginal.getLeague() + ", " +
|
||||||
|
"Spieltag " + matchOriginal.getMatchday() + ", " +
|
||||||
|
"Spielnummer " + matchOriginal.getMatchNo() + ", " +
|
||||||
|
"Spiel '" + TeamIDMatcher.getTeamNameFromTippligaId(matchOriginal.getTeamIdHome()) + "' - '" + TeamIDMatcher.getTeamNameFromTippligaId(matchOriginal.getTeamIdGuest()) + "', ";
|
||||||
|
|
||||||
if(matchOriginal.getTeamIdHome() != matchUpdated.getTeamIdHome()) {
|
if(matchOriginal.getTeamIdHome() != matchUpdated.getTeamIdHome()) {
|
||||||
updateString += updateStart +
|
updateString += updateStart +
|
||||||
"team_id_home = " + matchUpdated.getTeamIdHome() + " " +
|
"team_id_home = " + matchUpdated.getTeamIdHome() + " " +
|
||||||
condition;
|
condition;
|
||||||
|
this.beautifulInfo += beautifulInfoStart +
|
||||||
|
"Heimteam zu '" + matchUpdated.getTeamNameHome() + "'.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(matchOriginal.getTeamIdGuest() != matchUpdated.getTeamIdGuest()) {
|
if(matchOriginal.getTeamIdGuest() != matchUpdated.getTeamIdGuest()) {
|
||||||
updateString += updateStart +
|
updateString += updateStart +
|
||||||
"team_id_guest = " + matchUpdated.getTeamIdGuest() + " " +
|
"team_id_guest = " + matchUpdated.getTeamIdGuest() + " " +
|
||||||
condition;
|
condition;
|
||||||
|
this.beautifulInfo += beautifulInfoStart +
|
||||||
|
"Gastteam zu '" + matchUpdated.getTeamNameGuest() + "'.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!matchOriginal.getMatchDateTime().equals(matchUpdated.getMatchDateTime())) {
|
if (!matchOriginal.getMatchDateTime().equals(matchUpdated.getMatchDateTime())) {
|
||||||
updateString += updateStart +
|
updateString += updateStart +
|
||||||
"match_datetime = '" + matchUpdated.getMatchDateTime() + "' " +
|
"match_datetime = '" + matchUpdated.getMatchDateTime() + "' " +
|
||||||
condition;
|
condition;
|
||||||
|
this.beautifulInfo += beautifulInfoStart +
|
||||||
|
"Spielbeginn zu '" + matchUpdated.getMatchDateTime() + "'.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!matchOriginal.getStatus().equals(matchUpdated.getStatus())) {
|
if (!matchOriginal.getStatus().equals(matchUpdated.getStatus())) {
|
||||||
updateString += updateStart +
|
updateString += updateStart +
|
||||||
"status = '" + matchUpdated.getStatus() + "' " +
|
"status = '" + matchUpdated.getStatus() + "' " +
|
||||||
condition;
|
condition;
|
||||||
|
this.beautifulInfo += beautifulInfoStart +
|
||||||
|
"Status zu '" + matchUpdated.getStatus() + "'.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -150,7 +165,7 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
if(earliestDate.isAfter(now)) {
|
if(earliestDate.isAfter(now)) {
|
||||||
for(TLWMatch match : matches) {
|
for(TLWMatch match : matches) {
|
||||||
LocalDateTime date = TLWMatchesManagerBase.getDate(match);
|
LocalDateTime date = TLWMatchesManagerBase.getDate(match);
|
||||||
if (this.getDaysDifference(earliestDate, date) == 0) {
|
if (getDaysDifference(earliestDate, date) == 0) {
|
||||||
match.setStatus(0);
|
match.setStatus(0);
|
||||||
} else {
|
} else {
|
||||||
match.setStatus(-1);
|
match.setStatus(-1);
|
||||||
@@ -182,4 +197,8 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
public ArrayList<TLWMatch> getTLWMatchesUpdated() {
|
public ArrayList<TLWMatch> getTLWMatchesUpdated() {
|
||||||
return this.tlwMatchesUpdated;
|
return this.tlwMatchesUpdated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBeautifulInfo() {
|
||||||
|
return this.beautifulInfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,12 +87,12 @@ public class TippligaSQLConnector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<TLWMatch> getMatches(String season, String league) {
|
public ArrayList<TLWMatch> getMatches(String season, String league) {
|
||||||
String queryString = "SELECT * FROM `phpbb_footb_matches` WHERE `season` = " + season + " AND `league` = " + league + ";";
|
String queryString = "SELECT * FROM `phpbb_footb_matches` WHERE `season` = " + season + " AND `league` = " + league + " ORDER BY match_no ASC;";
|
||||||
return getMatches(queryString);
|
return getMatches(queryString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<TLWMatch> getMatches(String season, String league, String matchday) {
|
public ArrayList<TLWMatch> getMatches(String season, String league, String matchday) {
|
||||||
String queryString = "SELECT * FROM `phpbb_footb_matches` WHERE `season` = " + season + " AND `league` = " + league + " AND `matchday` = " + matchday + ";";
|
String queryString = "SELECT * FROM `phpbb_footb_matches` WHERE `season` = " + season + " AND `league` = " + league + " AND `matchday` = " + matchday + " ORDER BY match_no ASC;";
|
||||||
return getMatches(queryString);
|
return getMatches(queryString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ public class TLWMatchdayUpdaterTest {
|
|||||||
String sql = matchdaysUpdater.getUpdateSql();
|
String sql = matchdaysUpdater.getUpdateSql();
|
||||||
|
|
||||||
System.out.println(sql);
|
System.out.println(sql);
|
||||||
|
System.out.println(matchdaysUpdater.getBeautifulInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -20,5 +21,6 @@ public class TLWMatchdayUpdaterTest {
|
|||||||
String sql = matchdaysUpdater.getUpdateSql();
|
String sql = matchdaysUpdater.getUpdateSql();
|
||||||
|
|
||||||
System.out.println(sql);
|
System.out.println(sql);
|
||||||
|
System.out.println(matchdaysUpdater.getBeautifulInfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,18 +5,20 @@ import org.junit.Test;
|
|||||||
public class TLWMatchesUpdaterFootballTest {
|
public class TLWMatchesUpdaterFootballTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getUpdateSqlTest1() throws Exception {
|
public void getUpdateSqlTest1() {
|
||||||
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 1, "Tippliga.json");
|
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 1, "Tippliga.json");
|
||||||
String sql = updater.getUpdateSQL();
|
String sql = updater.getUpdateSQL();
|
||||||
|
|
||||||
System.out.println(sql);
|
System.out.println(sql);
|
||||||
|
System.out.println(updater.getBeautifulInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getUpdateSqlTest2() throws Exception {
|
public void getUpdateSqlTest2() {
|
||||||
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 2, "Tippliga.json");
|
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 2, "Tippliga.json");
|
||||||
String sql = updater.getUpdateSQL();
|
String sql = updater.getUpdateSQL();
|
||||||
|
|
||||||
System.out.println(sql);
|
System.out.println(sql);
|
||||||
|
System.out.println(updater.getBeautifulInfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user