Package junit.framework

Examples of junit.framework.AssertionFailedError.initCause()


         gcs = new GroovyCodeSource(url);
      }
      catch (IOException e)
      {
         AssertionFailedError err = new AssertionFailedError();
         err.initCause(e);
         throw err;
      }

      Class testClass = loader.parseClass(gcs);;
View Full Code Here


         testObject = (GroovyObject)testClass.newInstance();
      }
      catch (Exception e)
      {
         AssertionFailedError err = new AssertionFailedError();
         err.initCause(e);
         throw err;
      }

      // Invoke finally
      return testObject.invokeMethod("run", new Object[0]);
View Full Code Here

          if (oldMessage != null) {
            msg += "\n" + exception.getMessage();
          }
          AssertionFailedError newException = new AssertionFailedError(msg);
          newException.setStackTrace(exception.getStackTrace());
          newException.initCause(exception.getCause());
          exception = newException;
        } else {
          exception = new RuntimeException(msg, exception);
        }
      }
View Full Code Here

            logger.error("Thread " + exceptionEntry.getKey() + " failed with an exception", exceptionEntry.getValue());
        }
       
        if (exception != null) {
            final AssertionFailedError assertionError = new AssertionFailedError("Thread " + exception.getKey() + " failed with an exception");
            assertionError.initCause(exception.getValue());
            throw assertionError;
        }
    }
   
    private final ConcurrentMap<Integer, CountDownLatch> latchMap = new ConcurrentHashMap<Integer, CountDownLatch>();
View Full Code Here

         return Collections.list(loader.getResources(path));
      }
      catch (IOException e)
      {
         AssertionFailedError err = new AssertionFailedError();
         err.initCause(e);
         throw err;
      }
   }

   public RootContainer build()
View Full Code Here

      }
      catch (PrivilegedActionException pae)
      {
         Throwable cause = pae.getCause();
         AssertionFailedError err = new AssertionFailedError();
         err.initCause(cause);
         throw err;
      }
   }

   private RootContainer _build() throws Exception
View Full Code Here

   }

   public static void fail(Throwable t)
   {
      AssertionFailedError afe = new AssertionFailedError();
      afe.initCause(t);
      throw afe;
   }

   public static Error failure(Throwable t)
   {
View Full Code Here

   }

   public static Error failure(Throwable t)
   {
      AssertionFailedError afe = new AssertionFailedError();
      afe.initCause(t);
      return afe;
   }

   public static Error failure(String msg, Throwable t)
   {
View Full Code Here

   }

   public static Error failure(String msg, Throwable t)
   {
      AssertionFailedError afe = new AssertionFailedError(msg);
      afe.initCause(t);
      return afe;
   }
}
View Full Code Here

         return Collections.list(loader.getResources(path));
      }
      catch (IOException e)
      {
         AssertionFailedError err = new AssertionFailedError();
         err.initCause(e);
         throw err;
      }
   }

   public RootContainer build()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.