Package com.springsource.greenhouse.events

Examples of com.springsource.greenhouse.events.Event


  /**
   * Render the details of an event organized by the group as HTML in the web browser.
   */
  @RequestMapping(value="/groups/{group}/events/{year}/{month}/{slug}", method=RequestMethod.GET)
  public String eventView(@PathVariable String group, @PathVariable Integer year, @PathVariable Integer month, @PathVariable String slug, Model model) {
    Event event = eventRepository.findEventBySlug(group, year, month, slug);
    model.addAttribute(event);
    return "groups/event";
 
View Full Code Here


  public void loadEventData() {
    long eventId = eventLoaderRepository.loadEvent(
        new EventData(1, "Test Event", "Test Event Description", "test", "2012-10-15T00:00:00", "2012-10-18T23:59:59", "America/New_York", "NFJS", 297),
        new VenueData("Some Fancy Hotel", "1234 North Street, Chicago, IL 60605", 41.89001, -87.677765, "It's in Illinois"));
    assertEquals(1L, eventId);
    Event event = eventRepository.findEventBySlug("s2gx", 2012, 10, "test");
    assertEquals(1L, event.getId().longValue());
    assertEquals("Test Event", event.getTitle());
    assertEquals("test", event.getSlug());
    assertEquals("Test Event Description", event.getDescription());
//    assertEquals(new DateTime(2012, 10, 15, 1, 0, 0, 0, event.getTimeZone()), event.getStartTime().withZone(event.getTimeZone()));
//    assertEquals(new DateTime(2012, 10, 19, 0, 59, 59, 0, event.getTimeZone()), event.getEndTime().withZone(event.getTimeZone()));
    assertEquals(CachedDateTimeZone.forID("America/New_York"), event.getTimeZone());
    Set<Venue> venues = event.getVenues();
    assertEquals(1, venues.size());
    Venue venue = new ArrayList<Venue>(venues).get(0);
    assertEquals("Some Fancy Hotel", venue.getName());
    assertEquals("1234 North Street, Chicago, IL 60605", venue.getPostalAddress());
    assertEquals(41.89001, venue.getLocation().getLatitude().doubleValue(), .000000000001);
View Full Code Here

  public void updateEventData() {
    long eventId = eventLoaderRepository.loadEvent(
        new EventData(1, "Test Event", "Test Event Description", "test", "2012-10-15T00:00:00", "2012-10-18T23:59:59", "America/New_York", "NFJS", 297),
        new VenueData("Some Fancy Hotel", "1234 North Street, Chicago, IL 60605", 41.89001, -87.677765, "It's in Illinois"));
    assertEquals(1L, eventId);
    Event event = eventRepository.findEventBySlug("s2gx", 2012, 10, "test");
    assertEquals("Test Event", event.getTitle());
    Set<Venue> venues = event.getVenues();
    assertEquals(1, venues.size());
    Venue venue = new ArrayList<Venue>(venues).get(0);
    assertEquals("Some Fancy Hotel", venue.getName());
    long updatedEventId = eventLoaderRepository.loadEvent(
        new EventData(1, "Updated Event", "Test Event Description", "test", "2012-10-15T00:00:00", "2012-10-18T23:59:59", "America/New_York", "NFJS", 297),
        new VenueData("Some Conference Hall", "1234 North Street, Chicago, IL 60605", 41.89001, -87.677765, "It's in Illinois"));
    assertEquals(1L, updatedEventId);
    Event updatedEvent = eventRepository.findEventBySlug("s2gx", 2012, 10, "test");
    assertEquals("Updated Event", updatedEvent.getTitle());
    Set<Venue> updatedVenues = updatedEvent.getVenues();
    assertEquals(1, updatedVenues.size());
    Venue updatedVenue = new ArrayList<Venue>(updatedVenues).get(0);
    assertEquals("Some Conference Hall", updatedVenue.getName());
  }
View Full Code Here

TOP

Related Classes of com.springsource.greenhouse.events.Event

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.