Пример #1
0
 @org.junit.Test
 public void testRemoveStatusEmptyMsg() throws Exception {
   System.out.println("testRemoveStatusEmptyMsg");
   RemoveStatusRequestMsg req = new RemoveStatusRequestMsg();
   req.setClassification(new SecurityWrapper());
   StatusServiceImpl instance = new StatusServiceImpl(adminctx);
   try {
     RemoveStatusResponseMsg result = instance.removeStatus(req);
     fail("unexpected success");
   } catch (Exception ex) {
   }
 }
Пример #2
0
  @org.junit.Test
  public void testRemoveStatusValidMsgUser() throws Exception {
    System.out.println("testRemoveStatusValidMsgUser");
    RemoveStatusRequestMsg req = new RemoveStatusRequestMsg();
    req.setClassification(new SecurityWrapper());
    StatusServiceImpl instance = new StatusServiceImpl(userbobctx);
    try {
      req.getURI().add(url);
      RemoveStatusResponseMsg result = instance.removeStatus(req);
      fail("unexpected success");
    } catch (Exception ex) {

    }
  }
Пример #3
0
 @org.junit.Test
 public void testRemoveStatusValidMsgAdmin() throws Exception {
   System.out.println("testRemoveStatusValidMsgAdmin");
   RemoveStatusRequestMsg req = new RemoveStatusRequestMsg();
   req.setClassification(new SecurityWrapper());
   StatusServiceImpl instance = new StatusServiceImpl(adminctx);
   try {
     req.getURI().add(url);
     RemoveStatusResponseMsg result = instance.removeStatus(req);
     assertNotNull(result);
     assertNotNull(result.getClassification());
   } catch (Exception ex) {
     ex.printStackTrace();
     fail("unexpected fault");
   }
 }