impl: ldp remove aps using predicate
This commit is contained in:
@@ -2,15 +2,19 @@ package appointmentplanner;
|
|||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import java.util.List;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
import org.junit.jupiter.params.provider.Arguments;
|
import org.junit.jupiter.params.provider.Arguments;
|
||||||
import org.junit.jupiter.params.provider.MethodSource;
|
import org.junit.jupiter.params.provider.MethodSource;
|
||||||
|
|
||||||
import appointmentplanner.api.LocalDay;
|
import appointmentplanner.api.LocalDay;
|
||||||
import appointmentplanner.api.LocalDayPlan;
|
import appointmentplanner.api.LocalDayPlan;
|
||||||
|
import appointmentplanner.api.TimeSlot;
|
||||||
|
|
||||||
public class LocalDayPlanTest {
|
public class LocalDayPlanTest {
|
||||||
|
|
||||||
@@ -23,14 +27,14 @@ public class LocalDayPlanTest {
|
|||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("provideLocalDPDataset")
|
@MethodSource("provideLocalDPDataset")
|
||||||
void ldPlanInit_shouldBeSuccessful(LocalDay day, Instant start, Instant end) {
|
void ldpInit_shouldBeSuccessful(LocalDay day, Instant start, Instant end) {
|
||||||
LocalDayPlan plan = new LocalDayPlanImpl(day, start, end);
|
LocalDayPlan plan = new LocalDayPlanImpl(day, start, end);
|
||||||
assertThat(plan).isNotNull();
|
assertThat(plan).isNotNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("provideLocalDPDataset")
|
@MethodSource("provideLocalDPDataset")
|
||||||
void ldPlanGetters_shouldReturnSetValues(LocalDay day, Instant start, Instant end) {
|
void ldpGetters_shouldReturnSetValues(LocalDay day, Instant start, Instant end) {
|
||||||
LocalDayPlan plan = new LocalDayPlanImpl(day, start, end);
|
LocalDayPlan plan = new LocalDayPlanImpl(day, start, end);
|
||||||
|
|
||||||
assertThat(plan.day()).isEqualTo(day);
|
assertThat(plan.day()).isEqualTo(day);
|
||||||
@@ -40,7 +44,7 @@ public class LocalDayPlanTest {
|
|||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("provideLocalDPDataset")
|
@MethodSource("provideLocalDPDataset")
|
||||||
void ldToString_shouldReturnStringContainingLocalDateAndTimeZone(LocalDay day, Instant start, Instant end) {
|
void ldpToString_shouldReturnStringContainingLocalDateAndTimeZone(LocalDay day, Instant start, Instant end) {
|
||||||
LocalDayPlan plan = new LocalDayPlanImpl(day, start, end);
|
LocalDayPlan plan = new LocalDayPlanImpl(day, start, end);
|
||||||
|
|
||||||
assertThat(plan.toString()).contains(day.zone().toString(), day.date().toString());
|
assertThat(plan.toString()).contains(day.zone().toString(), day.date().toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user