Package org.junit.runners.model

Examples of org.junit.runners.model.InitializationError


    protected static class SuiteWithStringInName extends Suite
    {
      private static Class<?>[] getAnnotatedClasses(Class<?> klass) throws InitializationError {
        SuiteClasses annotation= klass.getAnnotation(SuiteClasses.class);
        if (annotation == null)
          throw new InitializationError(String.format("class '%s' must have a SuiteClasses annotation", klass.getName()));
        return annotation.value();
      }
View Full Code Here


      if (url == null) {
        throw new NullPointerException("resource missing: " + catalogName);
      }
      catalog = BrowserTestCatalog.get(url);
    } catch (Exception e) {
      throw new InitializationError(e);
    }
  }
View Full Code Here

      // Collect all test candidates, regardless if they will be executed or not.
      suiteDescription = Description.createSuiteDescription(suiteClass);
      testCandidates = collectTestCandidates(suiteDescription);
      this.groupEvaluator = new GroupEvaluator(testCandidates);
    } catch (Throwable t) {
      throw new InitializationError(t);
    }
  }
View Full Code Here

            runners = buildWebDriverRunners(webDriverConfiguration, klass);
        } else if (wrappedDriverConfiguration != null) {
            runners = buildWrappedDriverRunners(wrappedDriverConfiguration,
                    klass);
        } else {
            throw new InitializationError(
                    "Annotate test class with either ServerConfiguration, WebDriverConfiguration or WrappedDriverConfiguration");
        }
        return runners;
    }
View Full Code Here

                final WebDriverFactory factory = new WebDriverFactory(webDriverClass);
                runners.add(new SeleniumWebDriverJUnit4ClassRunner(factory,
                        klass));
            }
        } catch (final Exception e) {
            throw new InitializationError(e);
        }
        return runners;
    }
View Full Code Here

                final WrappedDriverFactory factory = new WrappedDriverFactory(
                        configuration, webDriverClass);
                runners.add(new SeleniumServerJUnit4ClassRunner(factory, klass));
            }
        } catch (final Exception e) {
            throw new InitializationError(e);
        }
        return runners;
    }
View Full Code Here

                final ServerFactory factory = new ServerFactory(configuration,
                        browserStartCommand);
                runners.add(new SeleniumServerJUnit4ClassRunner(factory, klass));
            }
        } catch (final Exception e) {
            throw new InitializationError(e);
        }
        return runners;
    }
View Full Code Here

    public OpenEjbRunner(final Class<?> testClazz) throws InitializationError {
        this.testClazz = testClazz;
        try {
            delegate = getDelegateRunner(testClazz);
        } catch (final Throwable e) {
            throw new InitializationError(Arrays.asList(e));
        }
    }
View Full Code Here

  private static Class<?> getFromTestClassloader(Class<?> clazz) throws InitializationError {
    try {
      ClassLoader testClassLoader = new TestClassLoader();
      return Class.forName(clazz.getName(), true, testClassLoader);
    } catch (ClassNotFoundException e) {
      throw new InitializationError(e);
    }
  }
View Full Code Here

      // Collect all test candidates, regardless if they will be executed or not.
      suiteDescription = Description.createSuiteDescription(suiteClass);
      testCandidates = collectTestCandidates(suiteDescription);
      testGroups = collectGroups(testCandidates);
    } catch (Throwable t) {
      throw new InitializationError(t);
    }
  }
View Full Code Here

TOP

Related Classes of org.junit.runners.model.InitializationError

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.