package com.fewlaps.quitnowsleepingtime;

import org.junit.Test;

import java.util.Locale;

import static org.junit.Assert.assertEquals;

public class DefaultValuesTest {

    @Test
    public void shouldUseLocalLocaleByDefault() {
        SleepingTime defaultLocaleST = new SleepingTime();
        SleepingTime localLocaleST = new SleepingTime(Locale.getDefault().getCountry());

        assertEquals(localLocaleST.getBedtime(), defaultLocaleST.getBedtime());
        assertEquals(localLocaleST.getWakeUp(), defaultLocaleST.getWakeUp());
    }
}

@@ -81,24 +81,105 @@
 il.Locale;%0A%0A
+import static com.fewlaps.quitnowsleepingtime.SleepingZone.DEFAULT_COUNTRY_CODE;%0A
 import stati
@@ -618,11 +618,469 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void shouldUseDefaultCountryCodeIfNotExistingLocale() %7B%0A        SleepingTime defaultCountryCodeSleepingTime = new SleepingTime(DEFAULT_COUNTRY_CODE);%0A        SleepingTime wrongLocaleSleepingTime = new SleepingTime(%22XX%22);%0A%0A        assertEquals(wrongLocaleSleepingTime.getBedtime(), defaultCountryCodeSleepingTime.getBedtime());%0A        assertEquals(wrongLocaleSleepingTime.getWakeUp(), defaultCountryCodeSleepingTime.getWakeUp());%0A    %7D
 %0A%7D%0A

Add tests for not existing contry codes