/** * 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(null); result.setUserOptions(new String[0]); result.setSilent(true); return result; }
println("OptionHandler: " + m_OptionHandler.getClass().getName() + "\n"); if (getDebug()) { println("--> Info"); print("Default options: "); println(printOptions(getDefaultOptions())); print("User options: "); println(printOptions(getUserOptions())); println("--> Tests"); m_Success = checkListOptions(); m_Success = checkSetOptions(); m_Success = checkDefaultOptions(); m_Success = checkRemainingOptions(); m_Success = checkCanonicalUserOptions(); m_Success = checkResettingOptions();
/** * tests whether the default settings are processed correctly */ public void testDefaultOptions() { if (m_OptionTester.getOptionHandler() != null) { if (!m_OptionTester.checkDefaultOptions()) fail("Default options were not processed correctly."); } }
/** * tests whether the default settings are processed correctly */ public void testDefaultOptions() { if (!m_OptionTester.checkDefaultOptions()) { m_OptionTester.setSilent(false); m_OptionTester.checkDefaultOptions(); fail("Default options were not processed correctly."); } }
/** * 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."); } }
/** * 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."); } }
/** * 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"); } }
/** * tests the setting of the options */ public void testSetOptions() { if (m_OptionTester.getOptionHandler() != null) { if (!m_OptionTester.checkSetOptions()) fail("setOptions method failed."); } }
public void testCanonicalUserOptions() { CheckOptionHandler optionHandler = new CheckOptionHandler(); DictionaryBuilder builder = new DictionaryBuilder(); optionHandler.setOptionHandler(builder); if (!optionHandler.checkCanonicalUserOptions()) { fail("setOptions method failed"); } }
public void testListOptions() { CheckOptionHandler optionHandler = new CheckOptionHandler(); DictionaryBuilder builder = new DictionaryBuilder(); optionHandler.setOptionHandler(builder); if (!optionHandler.checkListOptions()) { fail("Options cannot be listed via listOptions"); } }
public void testSetOptions() { CheckOptionHandler optionHandler = new CheckOptionHandler(); DictionaryBuilder builder = new DictionaryBuilder(); optionHandler.setOptionHandler(builder); if (!optionHandler.checkSetOptions()) { fail("setOptions method failed"); } }
public void testRemainingOptions() { CheckOptionHandler optionHandler = new CheckOptionHandler(); DictionaryBuilder builder = new DictionaryBuilder(); optionHandler.setOptionHandler(builder); if (!optionHandler.checkRemainingOptions()) { fail("There were leftover options"); } }
public void testResettingOptions() { CheckOptionHandler optionHandler = new CheckOptionHandler(); DictionaryBuilder builder = new DictionaryBuilder(); optionHandler.setOptionHandler(builder); if (!optionHandler.checkResettingOptions()) { 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 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."); } }
/** * tests whether the default settings are processed correctly */ public void testDefaultOptions() { if (!m_OptionTester.checkDefaultOptions()) { fail("Default options were not processed correctly."); } }
/** * tests whether there are any remaining options */ public void testRemainingOptions() { if (!m_OptionTester.checkRemainingOptions()) { fail("There were 'left-over' options."); } }
/** * Configures the CheckOptionHandler uses for testing the optionhandling. * Sets the scheme to test. * * @return the fully configured CheckOptionHandler */ protected CheckOptionHandler getOptionTester() { CheckOptionHandler result; result = super.getOptionTester(); if (getEvaluator() instanceof OptionHandler) result.setOptionHandler((OptionHandler) getEvaluator()); return result; }
/** * 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."); } }