package org.synyx.urlaubsverwaltung.settings;

import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.synyx.urlaubsverwaltung.period.DayLength;


class WorkingTimeSettingsTest {

    @Test
    void ensureDefaultValues() {

        WorkingTimeSettings settings = new WorkingTimeSettings();

        // Public holidays ---------------------------------------------------------------------------------------------
        Assert.assertNotNull("Should not be null", settings.getWorkingDurationForChristmasEve());
        Assert.assertNotNull("Should not be null", settings.getWorkingDurationForNewYearsEve());
        Assert.assertNotNull("Should not be null", settings.getFederalState());

        Assert.assertEquals("Wrong default value", DayLength.MORNING, settings.getWorkingDurationForChristmasEve());
        Assert.assertEquals("Wrong default value", DayLength.MORNING, settings.getWorkingDurationForNewYearsEve());
        Assert.assertEquals("Wrong default value", FederalState.BADEN_WUERTTEMBERG, settings.getFederalState());

        // Overtime ----------------------------------------------------------------------------------------------------
        Assert.assertNotNull("Should not be null", settings.isOvertimeActive());
        Assert.assertNotNull("Should not be null", settings.getMaximumOvertime());
        Assert.assertNotNull("Should not be null", settings.getMinimumOvertime());

        Assert.assertFalse("Should be deactivated", settings.isOvertimeActive());
        Assert.assertEquals("Wrong default value", (Integer) 100, settings.getMaximumOvertime());
        Assert.assertEquals("Wrong default value", (Integer) 5, settings.getMinimumOvertime());
    }
}

@@ -44,33 +44,8 @@
 s;%0A%0A
-import org.junit.Assert;%0A
 impo
@@ -129,16 +129,74 @@
 ength;%0A%0A
+import static org.assertj.core.api.Assertions.assertThat;%0A
 %0Aclass W
@@ -273,16 +273,22 @@
         
+final 
 WorkingT
@@ -471,51 +471,19 @@
     
-Assert.assertNotNull(%22Should not be null%22, 
+assertThat(
 sett
@@ -527,472 +527,190 @@
 e())
-;%0A        Assert.assertNotNull(%22Should not be null%22, settings.getWorkingDurationForNewYearsEve());%0A        Assert.assertNotNull(%22Should not be null%22, settings.getFederalState());%0A%0A        Assert.assertEquals(%22Wrong default value%22, DayLength.MORNING, settings.getWorkingDurationForChristmasEve());%0A        Assert.assertEquals(%22Wrong default value%22, DayLength.MORNING, settings.getWorkingDurationForNewYearsEve());%0A        Assert.assertEquals(%22Wrong default value%22, 
+.isEqualTo(DayLength.MORNING);%0A        assertThat(settings.getWorkingDurationForNewYearsEve()).isEqualTo(DayLength.MORNING);%0A        assertThat(settings.getFederalState()).isEqualTo(
 Fede
@@ -740,36 +740,8 @@
 BERG
-, settings.getFederalState()
 );%0A%0A
@@ -873,161 +873,56 @@
     
-Assert.assertNotNull(%22Should not be null%22, settings.isOvertimeActive());%0A        Assert.assertNotNull(%22Should not be null%22, settings.getMaximumOvertime()
+assertThat(settings.isOvertimeActive()).isFalse(
 );%0A 
@@ -932,51 +932,19 @@
     
-A
+a
 ssert
-.assertNotNull(%22Should not be null%22, 
+That(
 sett
@@ -944,34 +944,34 @@
 at(settings.getM
-in
+ax
 imumOvertime());
@@ -973,159 +973,44 @@
 e())
-;%0A%0A        Assert.assertFalse(%22Should be deactivated%22, settings.isOvertimeActive());%0A        Assert.assertEquals(%22Wrong default value%22, (Integer) 100, 
+.isEqualTo(100);%0A        assertThat(
 sett
@@ -1010,34 +1010,34 @@
 at(settings.getM
-ax
+in
 imumOvertime());
@@ -1039,103 +1039,20 @@
 e())
-;%0A        Assert.assertEquals(%22Wrong default value%22, (Integer) 5, settings.getMinimumOvertime()
+.isEqualTo(5
 );%0A 

Improve WorkingTimeSettings test