Exemplo n.º 1
0
 /*
 ---
    ----
 */
 @Test
 public void testAbuts_false2() {
   TimeInterval arg = TimeInterval.between(baseEnd, baseEnd.plusMinutes(10));
   assertFalse(baseInterval.abuts(arg));
 }
Exemplo n.º 2
0
 @Test
 public void testBetween_第一引数の時刻が第二引数の時刻より前なら受け付ける() {
   TimeInterval.between(LocalDateTime.MIN, LocalDateTime.MAX);
 }
Exemplo n.º 3
0
 @Before
 public void setUp() {
   baseStart = LocalDateTime.of(2014, 12, 14, 7, 0);
   baseEnd = LocalDateTime.of(2014, 12, 14, 8, 30);
   baseInterval = TimeInterval.between(baseStart, baseEnd);
 }
Exemplo n.º 4
0
 @Test(expected = RuntimeException.class)
 public void testBetween_第一引数の時刻が第二引数の時刻より後なら例外を返す() {
   TimeInterval.between(LocalDateTime.MAX, LocalDateTime.MIN);
 }
Exemplo n.º 5
0
 // baseInterval始点と終点に、引数のminutes分それぞれ加算したインスタンスを返す
 private TimeInterval createArg(int start, int end) {
   return TimeInterval.between(baseStart.plusMinutes(start), baseEnd.plusMinutes(end));
 }
Exemplo n.º 6
0
 /*
     ---
 ----
 */
 @Test
 public void testAbuts_false4() {
   TimeInterval arg = TimeInterval.between(baseStart.plusMinutes(-10), baseStart);
   assertFalse(baseInterval.abuts(arg));
 }