Ejemplo n.º 1
0
 @Test
 public void testInitServiceThrowsNullPointerException() throws Throwable {
   TaskAdaptor taskAdaptor = new TaskAdaptor();
   try {
     taskAdaptor.initService();
     fail("Expected NullPointerException to be thrown");
   } catch (NullPointerException ex) {
     assertNull("ex.getMessage()", ex.getMessage());
     assertNull("taskAdaptor.task", taskAdaptor.task);
     assertTrue("taskAdaptor.isModified()", taskAdaptor.isModified());
   }
 }
Ejemplo n.º 2
0
 @Test
 public void testInitServiceThrowsNullPointerException1() throws Throwable {
   TaskAdaptor taskAdaptor = new TaskAdaptor();
   String[] args = new String[0];
   taskAdaptor.setServer(q2);
   try {
     taskAdaptor.initService();
     fail("Expected NullPointerException to be thrown");
   } catch (NullPointerException ex) {
     assertNull("ex.getMessage()", ex.getMessage());
     assertNull("taskAdaptor.task", taskAdaptor.task);
     assertFalse("taskAdaptor.isModified()", taskAdaptor.isModified());
   }
 }