Extension SDK

oracle.jdeveloper.junit
Interface TestFixture


public interface TestFixture

A TestFixture becomes an instance variable of a TestCase. Any number of TestFixtures may be added to a TestCase. It is the responsability of the TestFixture to install itself to the TestCase and configure the JProject that is to run the TestCase. Since TestFixtures are instance variables, they also control the variable name prefix that is to be generated into the TestCase. The TestFixture class is the most important class for purposes of extensibility. We expect that the other Jdeveloper components will add testability to their components by specializing the TestFixture class. A TestFixture will implement the technology-specific test behaviors.


Method Summary
 void commitChanges()
          Commits all the generated code into the source file.
 void configureProject(JProject project)
          Configures the project for this TestFixture.
 JotClass getJotClass()
          Returns the JotClass for the TestFixture implementation class.
 java.lang.String getVariableNameInTest(TestCase testCase)
          Utility method to retrieve the variable name for this TestFixture.
 java.lang.String getVariableNamePrefix()
          Returns the variable name prefix that is to be used by this fixture's instance variable.
 void installToTestCase(TestCase testCase)
          The TestCase will call this function to allow then TestFixture to isntall itself to the TestCase.
 void setVariableNamePrefix(java.lang.String sPrefix)
          Sets the variable name prefix that is to be used by this fixture's instance variable.
 

Method Detail

configureProject

public void configureProject(JProject project)
Configures the project for this TestFixture. This is where you would add libaries to the project or download\install additional product components that are necessary to run this fixture.


installToTestCase

public void installToTestCase(TestCase testCase)
The TestCase will call this function to allow then TestFixture to isntall itself to the TestCase. The TestFixture will generate any utility methods, instance variables, imports,...


getJotClass

public JotClass getJotClass()
Returns the JotClass for the TestFixture implementation class.


getVariableNamePrefix

public java.lang.String getVariableNamePrefix()
Returns the variable name prefix that is to be used by this fixture's instance variable.


setVariableNamePrefix

public void setVariableNamePrefix(java.lang.String sPrefix)
Sets the variable name prefix that is to be used by this fixture's instance variable.


commitChanges

public void commitChanges()
Commits all the generated code into the source file.


getVariableNameInTest

public java.lang.String getVariableNameInTest(TestCase testCase)
Utility method to retrieve the variable name for this TestFixture. This method should use getVariableNamePrefix() to formulate the variable name.


Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.