CoView Preferences: JUnit Test Case Creation

To open CoView Preferences

  • 1. Click Windows > Preferences. The Preferences window is displayed.
  • 2. Expand Codign and select CoView Developer.
  • 3. Expand CoView Developer and select JUnit Test Case Creation.

Preference descriptions

  • Use Class Proxy for all method invocations (default: unchecked):The CoView Proxy class is necessary for testing private and protected methods. The Proxy Class is automatically added to every JUnit test case. CoView Proxy methods do not affect existing test cases but do require access to the codignjunit.jar file.
  • CoView Proxy Suffix (default: CoViewProxy):This  is the suffix appended to the original class name when creating a proxy class.
  • Create separate argument definitions (default: unchecked):When invoking the method under test within the test case, create an argument definition for each parameter. This is useful for testing complex methods with numerous parameters.
  • public static void main (String[] args) (default: unchecked):Add test runner statement for (default: disabled)
  • constructor (default: unchecked):Adds the default constructor to the test case.
  • Create final test methods (default: unchecked):Creates new test methods with the final modifier so that they cannot be overridden by a subclass.
  • Create tasks for generated test methods (default: unchecked):Creates a TO DO in the test case.
  • Add fail assertion to the generated test case (default: checked):Each test case contains a fail assertion. Users are encouraged to change the assertion to verify expected output.
  • Add Javadoc comment (default: checked):Adds the defined Javadoc comment to each test created by CoView.  The defined Javadoc text can contain the following keywords, which will be replaced appropriately when the Javadoc is added.
  • ${method} = the simple name of the method under test
  • ${method_fq} = the fully qualified name of the method under test
  • ${class} = the name of the class containing the method under test
  • ${file} = the name of the file containing the method under test
  • ${package} = the name of the package containing the method under test
  • ${date} = the date that the test method was created
  • ${time} = the time that the test method was created
CoView Preferences