package tourplaner.tests;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import tourplaner.business.ConfigHelper;
import tourplaner.business.EinheitenAdder;

import static org.junit.jupiter.api.Assertions.*;

class EinheitenAdderTest {

    @Test
    void addMeter() {
        assertEquals(EinheitenAdder.addMeter("1"), "1"+ " " + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "einheiten", "meter"));
    }

    @Test
    void addSpeed() {
        assertEquals(EinheitenAdder.addSpeed("1"), "1"+ " " + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "einheiten", "speed"));
    }

    @Test
    void addKm() {
        assertEquals(EinheitenAdder.addKm("1"), "1"+ " " + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "einheiten", "strecke"));
    }

    @Test
    void addMinuten() {
        assertEquals(EinheitenAdder.addMinuten("1"), "1"+ " " + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "einheiten", "zeit"));
    }

    @Test
    void addJson() {
        assertEquals(EinheitenAdder.addJson("1"), "1" + ".json");
    }
}