@Before
  public void setup() throws ConstraintViolation, NullDomainReference {

    createContacts();

    committee = new Committee();
    committee.setName("Committee Name");
    committeeService.create(committee);
    contactService.addContactToCommittee(first, committee);
    contactService.addContactToCommittee(second, committee);

    organization = new Organization();
    organization.setName("Organization Name");
    organizationService.create(organization);
    contactService.addContactToOrganization(first, organization);
    contactService.addContactToOrganization(second, organization);

    event = new Event();
    event.setName("Event Name");
    event.setDateHeld("2015-01-01");
    eventService.create(event);
    contactService.attendEvent(first, event);
    contactService.attendEvent(second, event);

    group = new Group();
    group.setGroupName("New AlinskyGroup");
  }
Example #2
0
  @Test
  public void testDate() {
    Model m = ModelFactory.createDefaultModel();
    Bean2RDF writer = new Bean2RDF(m);
    RDF2Bean reader = new RDF2Bean(m);

    Date d = new Date();
    Event event = new Event(d);
    event.setLocation("Dallas");
    event.setName("dinner");
    writer.save(event);
    Event event2 = reader.load(Event.class, d);
    assertNotNull(event2);
    assertEquals(d, event2.id());
  }