Package org.junit.runner

Examples of org.junit.runner.Description.addChild()


        @Override
        public Description getDescription() {
                Description spec= Description.createSuiteDescription(ExampleGraph.class);
                for (Runner runner : fRunners)
                        spec.addChild(runner.getDescription());
                return spec;
        }

        public List<Runner> getRunners() {
                return fRunners;
View Full Code Here


    @Override
    public Description getDescription() {
        Description description = Description.createSuiteDescription(testClass());
        for (String path : paths)
            description.addChild(createDescriptionForPath(path));

        return description;
    }

    private Description createDescriptionForPath(String path) {
View Full Code Here

        Description modDesc = Description.createSuiteDescription(name);
        desc.addChild(modDesc);
       
        for (AbstractFunction f : heap.getModule(name.replaceAll("\\\\","")).getTests()) {
          if (!(f.hasTag("ignore") || f.hasTag("Ignore") || f.hasTag("ignoreInterpreter") || f.hasTag("IgnoreInterpreter"))) {
            modDesc.addChild(Description.createTestDescription(getClass(), computeTestName(f.getName(), f.getAst().getLocation())));
          }
        }
      }
     
   
View Full Code Here

        assertFalse(childless.hashCode() == namedB.hashCode());
    }

    private Description descriptionWithTwoKids(String first, String second) {
        Description twoKids = Description.createSuiteDescription("a");
        twoKids.addChild(Description.createTestDescription(getClass(), first));
        twoKids.addChild(Description.createTestDescription(getClass(), second));
        return twoKids;
    }
}
View Full Code Here

    }

    private Description descriptionWithTwoKids(String first, String second) {
        Description twoKids = Description.createSuiteDescription("a");
        twoKids.addChild(Description.createTestDescription(getClass(), first));
        twoKids.addChild(Description.createTestDescription(getClass(), second));
        return twoKids;
    }
}
View Full Code Here

   * @return a <code>Description</code> showing the tests to be run by the receiver.
   */
  public Description getDescription() {
    Description spec = createSuiteDescription(testClass.getName());
    for (Method method : testMethods)
      spec.addChild(descriptionOf(method));
    return spec;
  }

  private Description descriptionOf(Method method) {
    return createTestDescription(testClass, method.getName());
View Full Code Here

  @Override
  public Description getDescription() {
    Description spec= Description.createSuiteDescription(getName());
    List<Method> testMethods= fTestMethods;
    for (Method method : testMethods)
        spec.addChild(methodDescription(method));
    return spec;
  }

  protected String getName() {
    return getTestClass().getName();
View Full Code Here

    assertFalse(childless.hashCode() == namedB.hashCode());
  }
 
  private Description descriptionWithTwoKids(String first, String second) {
    Description twoKids = Description.createSuiteDescription("a");
    twoKids.addChild(Description.createTestDescription(getClass(), first));
    twoKids.addChild(Description.createTestDescription(getClass(), second));
    return twoKids;
  }
}
View Full Code Here

  }
 
  private Description descriptionWithTwoKids(String first, String second) {
    Description twoKids = Description.createSuiteDescription("a");
    twoKids.addChild(Description.createTestDescription(getClass(), first));
    twoKids.addChild(Description.createTestDescription(getClass(), second));
    return twoKids;
  }
}
View Full Code Here

        assertEquals( "testMethod", testDescription.getMethodName() );
        assertEquals( "cannot.be.loaded.by.junit.Test", testDescription.getClassName() );
        // assert that the test class is not visible by the JUnit classloader
        assertNull( testDescription.getTestClass() );
        Description suiteDescription = Description.createSuiteDescription( "testSuite" );
        suiteDescription.addChild( testDescription );
        Map<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
        JUnitCoreRunListener listener = new JUnitCoreRunListener( new MockReporter(), classMethodCounts );
        listener.testRunStarted( suiteDescription );
        assertEquals( 1, classMethodCounts.size() );
        TestSet testSet = classMethodCounts.get( "cannot.be.loaded.by.junit.Test" );
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.