コード例 #1
0
 @Test
 public void testAllTaskDay() {
   GetAllTask g = new GetAllTask();
   Object[][] result = new Object[1][7];
   String expected = "01:00 - 02:00";
   result = g.allTaskDay("8-Jun-12");
   assertEquals(result[0][0].toString(), expected);
 }
コード例 #2
0
  @Test
  public void testAllEventToday() {
    GetAllTask g = new GetAllTask();
    Object[][] result = new Object[1][7];
    String expected = "4Party";
    result = g.allEventToday("8-Jun-12");

    assertEquals(result[0][0].toString() + result[0][1].toString(), expected);
  }
コード例 #3
0
  @Test
  public void testIsEvent() {
    GetAllTask g = new GetAllTask();
    boolean result = false;
    boolean expected = false;
    result = g.isEvent("1");

    assertEquals(result, expected);
  }
コード例 #4
0
 @Test
 public void testAllTaskWeek() {
   GetAllTask g = new GetAllTask();
   Object[][] result = new Object[1][7];
   String expected = "Wednesdaydinnersmediumtrue5from 06-Jun-12 to 06-Dec-12Active12-13";
   result = g.allTaskWeek("8-Jun-12");
   assertEquals(
       result[0][0].toString()
           + result[0][1].toString()
           + result[0][2].toString()
           + result[0][3].toString()
           + result[0][4].toString()
           + result[0][5].toString()
           + result[0][6].toString()
           + result[0][7].toString(),
       expected);
 }