Package org.junit.runners.model

Examples of org.junit.runners.model.FrameworkMethod


     * @throws NoTestsRemainException
     */
    public void filter(Filter filter) throws NoTestsRemainException {

        for (Iterator<FrameworkMethod> iter = frameworkMethods.iterator(); iter.hasNext();) {
            FrameworkMethod each = iter.next();
            if (shouldRun(filter, each))
                try {
                    filter.apply(each);
                } catch (NoTestsRemainException e) {
                    iter.remove();
View Full Code Here


    super(ruleFields);
  }

  public void intercept(final IMethodInvocation invocation) throws Throwable {
    Statement statement = createBaseStatement(invocation);
    FrameworkMethod method = createFrameworkMethod(invocation);

    for (FieldInfo field : ruleFields) {
      MethodRule rule = (MethodRule) getRuleInstance(field, invocation.getInstance());
      statement = rule.apply(statement, method, invocation.getInstance());
    }
View Full Code Here

    statement.evaluate();
  }

  private FrameworkMethod createFrameworkMethod(final IMethodInvocation invocation) {
    return new FrameworkMethod(invocation.getMethod().getReflection()) {
      @Override
      public String getName() {
        return invocation.getIteration().getDescription().getMethodName();
      }
    };
View Full Code Here

        final BlockJUnit4ClassRunner filteredRunner = new BlockJUnit4ClassRunner(testClass) {
            @Override
            protected List<FrameworkMethod> getChildren() {
                try {
                    return Arrays.asList(new FrameworkMethod(testClass.getMethod(args[1])));
                } catch (final NoSuchMethodException e) {
                    throw new IllegalArgumentException(e);
                }
            }
        };
View Full Code Here

TOP

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

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.