/**
   * Configures the CheckOptionHandler uses for testing the optionhandling. Sets the scheme to test.
   *
   * @return the fully configured CheckOptionHandler
   */
  protected CheckOptionHandler getOptionTester() {
    CheckOptionHandler result;

    result = new CheckOptionHandler();
    result.setOptionHandler(getGenerator());
    result.setUserOptions(new String[0]);
    result.setSilent(true);

    return result;
  }
示例#2
0
  /**
   * Configures the CheckOptionHandler uses for testing the optionhandling. Sets the Kernel return
   * from the getKernel() method.
   *
   * @return the fully configured CheckOptionHandler
   * @see #getKernel()
   */
  protected CheckOptionHandler getOptionTester() {
    CheckOptionHandler result;

    result = new CheckOptionHandler();
    if (getKernel() instanceof OptionHandler) result.setOptionHandler((OptionHandler) getKernel());
    else result.setOptionHandler(null);
    result.setUserOptions(new String[0]);
    result.setSilent(true);

    return result;
  }
 /** tests the resetting of the options to the default ones */
 public void testResettingOptions() {
   if (!m_OptionTester.checkSetOptions()) {
     fail("Resetting of options failed");
   }
 }
 /**
  * tests the whether the user-supplied options stay the same after setting. getting, and
  * re-setting again.
  */
 public void testCanonicalUserOptions() {
   if (!m_OptionTester.checkCanonicalUserOptions()) {
     fail("setOptions method failed");
   }
 }
 /** tests whether there are any remaining options */
 public void testRemainingOptions() {
   if (!m_OptionTester.checkRemainingOptions()) {
     fail("There were 'left-over' options.");
   }
 }
 /** tests whether the default settings are processed correctly */
 public void testDefaultOptions() {
   if (!m_OptionTester.checkDefaultOptions()) {
     fail("Default options were not processed correctly.");
   }
 }
 /** tests the setting of the options */
 public void testSetOptions() {
   if (!m_OptionTester.checkSetOptions()) {
     fail("setOptions method failed.");
   }
 }
 /** tests the listing of the options */
 public void testListOptions() {
   if (!m_OptionTester.checkListOptions()) {
     fail("Options cannot be listed via listOptions.");
   }
 }
示例#9
0
 /** tests the resetting of the options to the default ones */
 public void testResettingOptions() {
   if (m_OptionTester.getOptionHandler() != null) {
     if (!m_OptionTester.checkSetOptions()) fail("Resetting of options failed");
   }
 }
示例#10
0
 /**
  * tests the whether the user-supplied options stay the same after setting. getting, and
  * re-setting again.
  *
  * @see #getOptionTester()
  */
 public void testCanonicalUserOptions() {
   if (m_OptionTester.getOptionHandler() != null) {
     if (!m_OptionTester.checkCanonicalUserOptions()) fail("setOptions method failed");
   }
 }
示例#11
0
 /** tests whether there are any remaining options */
 public void testRemainingOptions() {
   if (m_OptionTester.getOptionHandler() != null) {
     if (!m_OptionTester.checkRemainingOptions()) fail("There were 'left-over' options.");
   }
 }
示例#12
0
 /** tests the setting of the options */
 public void testSetOptions() {
   if (m_OptionTester.getOptionHandler() != null) {
     if (!m_OptionTester.checkSetOptions()) fail("setOptions method failed.");
   }
 }
示例#13
0
 /** tests the listing of the options */
 public void testListOptions() {
   if (m_OptionTester.getOptionHandler() != null) {
     if (!m_OptionTester.checkListOptions()) fail("Options cannot be listed via listOptions.");
   }
 }