Package org.martinlaw.bo

Examples of org.martinlaw.bo.CalendarEvent


  @Test(expected = DataIntegrityViolationException.class)
  /**
   * tests that non nullable fields are checked
   */
  public void testCalendarEventNullableFields() {
    CalendarEvent calendarEvent = new CalendarEvent();
    getBoSvc().save(calendarEvent);
  }
View Full Code Here


  /**
   * tests retrieving from date inserted via sql
   */
  public void testCalendarEventRetrieve() {
    // retrieve object populated via sql script
    CalendarEvent calendarEvent = getBoSvc().findBySinglePrimaryKey(
        CalendarEvent.class, 1001l);
    assertNotNull(calendarEvent);
    assertEquals(new Long(1l), calendarEvent.getDateVersionNumber());
  }
View Full Code Here

   */
  public void testCalendarEventCRUD() {
    // C
    String url = "http://cal.yahoo.com/?eventId=56";
    Long dateVersionNumber = 2l;
    CalendarEvent calendarEvent = new CalendarEvent(url, dateVersionNumber);
    getBoSvc().save(calendarEvent);
    // R
    calendarEvent.refresh();
    assertEquals("url does not match", url, calendarEvent.getUrl());
    assertEquals("date ver nbr does not match", dateVersionNumber, calendarEvent.getDateVersionNumber());
    // U
    dateVersionNumber = 3l;
    calendarEvent.setDateVersionNumber(dateVersionNumber);
    calendarEvent.refresh();
    assertEquals("date ver nbr does not match",  dateVersionNumber, calendarEvent.getDateVersionNumber());
    // D
    getBoSvc().delete(calendarEvent);
    assertNull(getBoSvc().findBySinglePrimaryKey(CalendarEvent.class,
        calendarEvent.getId()));
  }
View Full Code Here

TOP

Related Classes of org.martinlaw.bo.CalendarEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.