コード例 #1
0
  public void testSetTimeZone() {
    Object[] tzs = handler.listTimeZones();
    assertNotNull(tzs);
    assertTrue(tzs.length != 0);
    RhnTimeZone tz = (RhnTimeZone) tzs[0];

    assertEquals(1, handler.setTimeZone(adminKey, admin.getLogin(), tz.getTimeZoneId()));

    RhnTimeZone usersTz = admin.getTimeZone();
    assertNotNull(usersTz);
    assertEquals(tz.getTimeZoneId(), usersTz.getTimeZoneId());
  }
コード例 #2
0
 public void testListTimeZone() {
   Object[] tzs = handler.listTimeZones();
   assertNotNull(tzs);
   assertTrue("TimeZone list is empty", tzs.length != 0);
   assertEquals(RhnTimeZone.class, tzs[0].getClass());
 }