Exemplo n.º 1
0
 @Ignore
 @Test
 public void testCommunity() {
   // we can also add other tests within the same class; this was added after
   // a problem with createCommunity() to actually perform a specific test over
   // the problematic step narrowing the case
   Community comm = new Community();
   comm.setTitle("Test");
   assertEquals("Test", comm.getTitle());
 }
Exemplo n.º 2
0
  @Ignore
  @Test
  public void testCreate() throws Exception {

    CommunityService svc = new CommunityService();
    Community comm = new Community();

    // using static constants allow to make assertions about them within the test client
    comm.setTitle(NEW_COMMUNITY);
    comm.setContent(TEST_COMMUNITY_DESCRIPTION);

    comm = svc.createCommunity(comm, true);
    assertEquals("NEW_COMMUNITY", comm.getTitle());
    assertEquals("TEST_COMMUNITY_DESCRIPTION", comm.getContent());
  }