diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/TimeWindowsImplTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/TimeWindowsImplTest.java new file mode 100644 index 00000000..ddf7af60 --- /dev/null +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/TimeWindowsImplTest.java @@ -0,0 +1,23 @@ +package jsprit.core.problem.solution.route.activity; + +import org.junit.Test; + +/** + * Created by schroeder on 18/12/15. + */ +public class TimeWindowsImplTest { + + @Test(expected = IllegalStateException.class) + public void overlappingTW_shouldThrowException(){ + TimeWindowsImpl tws = new TimeWindowsImpl(); + tws.add(TimeWindow.newInstance(50, 100)); + tws.add(TimeWindow.newInstance(90,150)); + } + + @Test(expected = IllegalStateException.class) + public void overlappingTW2_shouldThrowException(){ + TimeWindowsImpl tws = new TimeWindowsImpl(); + tws.add(TimeWindow.newInstance(50, 100)); + tws.add(TimeWindow.newInstance(40,150)); + } +}