Package org.fest.swing.exception

Examples of org.fest.swing.exception.UnexpectedException


    }
  }

  private static UnexpectedException cannotLoadType(String typeName, Exception e) {
    String msg = String.format("Unable to load class %s", typeName);
    throw new UnexpectedException(msg, e);
  }
View Full Code Here


        }
      });
      return launcherFor(checkNotNull((Applet) applet));
    } catch (Exception e) {
      String msg = String.format("Unable to create a new instance of %s", appletType.getName());
      throw new UnexpectedException(msg, e);
    }
  }
View Full Code Here

  public static @Nonnull ApplicationLauncher application(@Nonnull String applicationTypeName) {
    try {
      Class<?> applicationType = Thread.currentThread().getContextClassLoader().loadClass(applicationTypeName);
      return application(applicationType);
    } catch (ClassNotFoundException e) {
      throw new UnexpectedException(concat("Unable to load class ", quote(applicationTypeName)), e);
    }
  }
View Full Code Here

  @Test
  public void should_throw_error_if_setProperty_is_vetoed() {
    final PropertyVetoException vetoed = new PropertyVetoException("Test", null);
    JInternalFrameAction action = MAXIMIZE;
    try {
      driver.failIfVetoed(internalFrame, action, new UnexpectedException(vetoed));
      failWhenExpectingException();
    } catch (ActionFailedException e) {
      assertThat(e.getMessage()).contains(action.name).contains("was vetoed: <Test>");
    }
  }
View Full Code Here

    }
  }

  @Test
  public void should_not_throw_error_if_setProperty_is_not_vetoed() {
    driver.failIfVetoed(internalFrame, MAXIMIZE, new UnexpectedException(new Exception()));
  }
View Full Code Here

      throw cannotLoadType(typeName, e);
    }
  }

  private static UnexpectedException cannotLoadType(String typeName, Exception e) {
    throw new UnexpectedException(concat("Unable to load class ", typeName), e);
  }
View Full Code Here

      throw cannotInstantiateApplet(appletType.getName(), e);
    }
  }
 
  private static UnexpectedException cannotInstantiateApplet(String appletType, Exception cause) {
    throw new UnexpectedException(concat("Unable to create a new instance of ", appletType), cause);
  }
View Full Code Here

  public static ApplicationLauncher application(String applicationTypeName) {
    try {
      Class<?> applicationType = Thread.currentThread().getContextClassLoader().loadClass(applicationTypeName);
      return application(applicationType);
    } catch (ClassNotFoundException e) {
      throw new UnexpectedException(concat("Unable to load class ", quote(applicationTypeName)), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.fest.swing.exception.UnexpectedException

Copyright © 2018 www.massapicom. 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.