Ejemplo n.º 1
0
 public static boolean testGoogleEventRequestById() {
   GoogleEvent event = new GoogleEvent();
   event.requestById(1);
   try {
     assertEquals("The event name is invalid", "Jackson Square", event.getEventName());
     return true;
   } catch (Exception e) {
     return false;
   }
 }
Ejemplo n.º 2
0
  public static boolean testEditGoogleEvent() {
    try {
      GoogleEvent event = new GoogleEvent();
      event.requestById(1000);
      String orignalName = event.getEventName();
      String newName = "My fake event";
      event.setName(newName);
      event.save();

      assertEquals("The event name is invalid", newName, event.getEventName());

      // Revert back to old name
      event.setName(orignalName);
      event.save();
      assertEquals("The event name is invalid", orignalName, event.getEventName());

      return true;
    } catch (Exception e) {
      return false;
    }
  }