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