Examples of AssertionFailedError


Examples of junit.framework.AssertionFailedError

        String error = (String) map.get(ModelView.ERROR);

        if ("true".equalsIgnoreCase(error)) {
            if (expiredTime) {
                throw new AssertionFailedError("Add the location " + location +
                    " takes more than " + (waittime / 60) +
                    " and search the query " + query + " failed. Status:" +
                    (String) map.get(ModelView.STATUS));
            } else {
                throw new AssertionFailedError("Add the location " + location +
                    " and search the query " + query + " in " +
                    ((System.currentTimeMillis() - starttime) / 1000) +
                    " seconds failed. Status:" +
                    (String) map.get(ModelView.STATUS));
            }
View Full Code Here

Examples of junit.framework.AssertionFailedError

        myContents.addAll(returnValues);
    }

    public Object getNext() {
        if (myContents.isEmpty()) {
            throw new AssertionFailedError(getClass().getName() + "[" + myName + "] was not setup with enough values");
        }
        return pop();
    }
View Full Code Here

Examples of junit.framework.AssertionFailedError

    public void testMockAnnotatesAssertionFailedError()
            throws Throwable {
        final String originalMessage = "original message";

        Object arg = new AssertionFailedError(originalMessage);
        mockDispatcher.dispatchResult = arg;

        try {
            proxy.noArgVoidMethod();
        } catch (AssertionFailedError err) {
View Full Code Here

Examples of junit.framework.AssertionFailedError

        mockDispatcher.verifyExpectations();
    }

    public void testVerifyFailuresIncludeMockName() {
        mockDispatcher.verifyFailure = new AssertionFailedError("verify failure");

        mockDispatcher.verifyCalls.setExpected(1);

        try {
            coreMock.verify();
View Full Code Here

Examples of junit.framework.AssertionFailedError

    public void verify() {
        try {
            invocationDispatcher.verify();
        } catch (AssertionFailedError ex) {
            throw new AssertionFailedError(name + ": " + ex.getMessage());
        }
    }
View Full Code Here

Examples of junit.framework.AssertionFailedError

    }
    return iterator.next();
  }

  static void fail(Throwable cause, Object message) {
    AssertionFailedError assertionFailedError =
        new AssertionFailedError(String.valueOf(message));
    assertionFailedError.initCause(cause);
    throw assertionFailedError;
  }
View Full Code Here

Examples of junit.framework.AssertionFailedError

  
   public void assertMBeanFailed(ObjectName name, boolean registered) throws Exception
   {
      MBeanServer server = getServer();
      if (registered == false && server.isRegistered(name))
         throw new AssertionFailedError(name + " should not be registered after a failure");
      if (registered && server.isRegistered(name) == false)
         throw new AssertionFailedError(name + " should be registered after a failure");
   }
View Full Code Here

Examples of junit.framework.AssertionFailedError

      if (expected != null)
      {
         try
         {
            deploy(url, true);
            throw new AssertionFailedError("Should have got a " + expected.getName());
         }
         catch (Throwable throwable)
         {
            AbstractSystemTest.checkThrowableDeep(expected, throwable);
            return Collections.emptyList();
View Full Code Here

Examples of junit.framework.AssertionFailedError

   protected IncompleteDeploymentException assertInvalidDeployments() throws Exception
   {
      try
      {
         validate();
         throw new AssertionFailedError("Deployments should not be valid!");
      }
      catch (IncompleteDeploymentException expected)
      {
         log.debug("Got expected " + expected.getClass().getName());
         return expected;
View Full Code Here

Examples of junit.framework.AssertionFailedError

   protected void assertInitialDeployFailure(URL url, ObjectName name, Class<? extends Throwable> expected) throws Exception
   {
      try
      {
         deploy(url, true);
         throw new AssertionFailedError("Should have got a " + expected.getName());
      }
      catch (Throwable t)
      {
         AbstractSystemTest.checkThrowableDeep(expected, t);
      }
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.