FileDocCategorySizeDatePackage
TestSuiteVisitor.javaAPI DocHibernate 3.2.51025Tue Dec 12 16:22:26 GMT 2006org.hibernate.junit

TestSuiteVisitor

public class TestSuiteVisitor extends Object
Handles walking a TestSuite hierarchy for recognition of individual tests.
author
Steve Ebersole

Fields Summary
private final Handler
handler
Constructors Summary
public TestSuiteVisitor(Handler handler)

		this.handler = handler;
	
Methods Summary
public voidvisit(junit.framework.TestSuite testSuite)

		handler.startingTestSuite( testSuite );
		Enumeration tests = testSuite.tests();
		while ( tests.hasMoreElements() ) {
			Test test = ( Test ) tests.nextElement();
			if ( test instanceof TestSuite ) {
				visit( ( TestSuite ) test );
			}
			else {
				handler.handleTestCase( test );
			}
		}
		handler.completedTestSuite( testSuite );