Package junit.framework

Examples of junit.framework.TestSuite.testAt()


      TestSuite ts= (TestSuite) test;
      String name= ts.getName() == null ? "" : ts.getName();
      Description description= Description.createSuiteDescription(name);
      int n= ts.testCount();
      for (int i= 0; i < n; i++)
        description.addChild(makeDescription(ts.testAt(i)));
      return description;
    } else if (test instanceof JUnit4TestAdapter) {
      JUnit4TestAdapter adapter= (JUnit4TestAdapter) test;
      return adapter.getDescription();
    } else if (test instanceof TestDecorator) {
View Full Code Here


    if (target.equals(node))
      return 0;
     
    TestSuite suite= isTestSuite(node);
    for (int i= 0; i < getChildCount(node); i++) {
      Test t= suite.testAt(i);
      int index= findTest(target, t, path);
      if (index >= 0) {
        path.insertElementAt(node, 0);
        if (path.size() == 1)
          return i;
View Full Code Here

   * Gets the test at the given index
   */
  public Object getChild(Object parent, int index) {
    TestSuite suite= isTestSuite(parent);
    if (suite != null)
      return suite.testAt(index);
    return null;
  }
  /**
   * Gets the number of tests.
   */
 
View Full Code Here

            TestSuite ts = (TestSuite) test;
            String name = ts.getName() == null ? createSuiteDescription(ts) : ts.getName();
            Description description = Description.createSuiteDescription(name);
            int n = ts.testCount();
            for (int i = 0; i < n; i++) {
                Description made = makeDescription(ts.testAt(i));
                description.addChild(made);
            }
            return description;
        } else if (test instanceof Describable) {
            Describable adapter = (Describable) 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.