package de.jeyp91.tippliga;

import org.junit.Test;

import java.util.ArrayList;

import static org.junit.Assert.assertEquals;

public class TLWMatchesCreatorFootballTest {

    @Test
    public void getMatchesTest() {
        TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(2021, 1, "WTL_Pokal.json");
        ArrayList<TLWMatch> matches = creator.getMatches();

        assertEquals((Integer) 1, matches.get(0).getMatchNo());
        assertEquals((Integer) 11, matches.get(10).getMatchNo());
        System.out.println(matches.get(0).getSQLQueryReplace());
    }

    @Test
    public void getMatchesTippligaSqlTest() {
        TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(2021, 2, "Tippliga.json");
        String sql = creator.getSQLInsertString();
        System.out.println(sql);
    }

    @Test
    public void getMatchesWTLPokalSqlTest() {
        TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(2021, 48, "WTL_Pokal.json");
        String sql = creator.getSQLInsertString();
        System.out.println(sql);
    }
}
