Examples of InitializationError


Examples of org.junit.runners.model.InitializationError

      }
      return manifest;
    } catch (IOException e) {
      List<Throwable> list = new ArrayList<Throwable>(1);
      list.add(e);
      throw new InitializationError(list);
    }
  }
View Full Code Here

Examples of org.junit.runners.model.InitializationError

  }
 
  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

Examples of org.junit.runners.model.InitializationError

  private void validate() throws InitializationError {
    List<Throwable> errors= new ArrayList<Throwable>();
    collectInitializationErrors(errors);
    if (!errors.isEmpty())
      throw new InitializationError(errors);
  }
View Full Code Here

Examples of org.junit.runners.model.InitializationError

    super(klass, builder);
    try {
      filter(new CategoryFilter(getIncludedCategory(klass),
          getExcludedCategory(klass)));
    } catch (NoTestsRemainException e) {
      throw new InitializationError(e);
    }
    assertNoCategorizedDescendentsOfUncategorizeableParents(getDescription());
  }
View Full Code Here

Examples of org.junit.runners.model.InitializationError

  }
 
  private void assertNoDescendantsHaveCategoryAnnotations(Description description) throws InitializationError {     
    for (Description each : description.getChildren()) {
      if (each.getAnnotation(Category.class) != null)
        throw new InitializationError("Category annotations on Parameterized classes are not supported on individual methods.");
      assertNoDescendantsHaveCategoryAnnotations(each);
    }
  }
View Full Code Here

Examples of org.junit.runners.model.InitializationError

                return setSchedulers( suiteSuites.wrappingSuite, suiteClasses.wrappingSuite );
            }
            catch ( TestSetFailedException e )
            {
                throw new InitializationError( e );
            }
        }
View Full Code Here

Examples of org.junit.runners.model.InitializationError

        Module[] modules = new Module[classes.length];
        for (int i = 0; i < classes.length; i++) {
            try {
                modules[i] = (Module) (classes[i]).newInstance();
            } catch (InstantiationException e) {
                throw new InitializationError(e);
            } catch (IllegalAccessException e) {
                throw new InitializationError(e);
            }
        }
        return Guice.createInjector(modules);
    }
View Full Code Here

Examples of org.junit.runners.model.InitializationError

    }

    private Class<?>[] getModulesFor(Class<?> klass) throws InitializationError {
        GuiceInjectors annotation = klass.getAnnotation(GuiceInjectors.class);
        if (annotation == null) {
            throw new InitializationError(
                    "Missing @GuiceModules annotation for unit test '" + klass.getName()
                    + "'");
        }
        return annotation.value();
    }
View Full Code Here

Examples of org.junit.runners.model.InitializationError

            final String gripe = "Test class should have at least one @Module method";
            errors.add(new Exception(gripe));
        }

        if (!errors.isEmpty()) {
            throw new InitializationError(errors);
        }
    }
View Full Code Here

Examples of org.junit.runners.model.InitializationError

        }
        catch ( Exception e )
        {
            final List<Throwable> throwables = new LinkedList<Throwable>();
            throwables.add( e );
            throw new InitializationError( throwables );
        }
    }
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.