Beispiel #1
0
 @org.junit.Test
 public void testRemoveStatusClassNullMsg() throws Exception {
   System.out.println("testRemoveStatusClassNullMsg");
   RemoveStatusRequestMsg req = new RemoveStatusRequestMsg();
   StatusServiceImpl instance = new StatusServiceImpl(adminctx);
   try {
     RemoveStatusResponseMsg result = instance.removeStatus(req);
     fail("unexpected success");
   } catch (Exception ex) {
   }
 }
Beispiel #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) {

    }
  }
Beispiel #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");
   }
 }