package de.jeyp91;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class TeamIDMatcherTest {

    @Test
    public void getOpenLigaDbIdFromTippligaIdTest() {
        int apiFootballId;

        apiFootballId = TeamIDMatcher.getApiFootballIdFromTippligaId(505);
        assertEquals(80, apiFootballId);
        apiFootballId = TeamIDMatcher.getApiFootballIdFromTippligaId(160);
        assertEquals(91, apiFootballId);
        apiFootballId = TeamIDMatcher.getApiFootballIdFromTippligaId(182);
        assertEquals(12754, apiFootballId);
    }

    @Test
    public void getTippligaIdFromOpenLigaDbIdTest() {
        int tlwId;

        tlwId = TeamIDMatcher.getTippligaIdFromApiFootballId(80);
        assertEquals(505, tlwId);
        tlwId = TeamIDMatcher.getTippligaIdFromApiFootballId(91);
        assertEquals(160, tlwId);
        tlwId = TeamIDMatcher.getTippligaIdFromApiFootballId(12754);
        assertEquals(182, tlwId);
    }
}
