/** * Called by JUnit before each test method. * * @throws Exception if an error occurs reading the example instances. */ @Override protected void setUp() throws Exception { m_Classifier = null; m_OptionTester = new CheckOptionHandler(); m_OptionTester.setSilent(true); // delete temp file File file = new File(MODEL_FILENAME); if (file.exists()) { file.delete(); } }
/** * 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.checkCanonicalUserOptions()) { m_OptionTester.setSilent(false); m_OptionTester.checkCanonicalUserOptions(); fail("setOptions method failed"); } }
/** * Called by JUnit before each test method. * * @throws Exception if an error occurs */ @Override protected void setUp() throws Exception { super.setUp(); m_OptionTester = new CheckOptionHandler(); m_OptionTester.setOptionHandler(getOptionHandler()); m_OptionTester.setUserOptions(new String[0]); m_OptionTester.setSilent(true); }
/** * 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; }
/** * tests the resetting of the options to the default ones */ public void testResettingOptions() { if (!m_OptionTester.checkSetOptions()) { m_OptionTester.setSilent(false); m_OptionTester.checkSetOptions(); fail("Resetting of options failed"); } }
/** * tests the listing of the options */ public void testListOptions() { if (!m_OptionTester.checkListOptions()) { m_OptionTester.setSilent(false); m_OptionTester.checkListOptions(); fail("Options cannot be listed via listOptions."); } }
/** * tests the setting of the options */ public void testSetOptions() { if (!m_OptionTester.checkSetOptions()) { m_OptionTester.setSilent(false); m_OptionTester.checkSetOptions(); fail("setOptions method failed."); } }
/** * 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 whether there are any remaining options */ public void testRemainingOptions() { if (!m_OptionTester.checkRemainingOptions()) { m_OptionTester.setSilent(false); m_OptionTester.checkRemainingOptions(); fail("There were 'left-over' options."); } }
/** * Called by JUnit before each test method. * * @throws Exception if an error occurs */ @Override protected void setUp() throws Exception { super.setUp(); m_OptionTester = new CheckOptionHandler(); m_OptionTester.setOptionHandler(getOptionHandler()); m_OptionTester.setUserOptions(new String[0]); m_OptionTester.setSilent(true); }
/** * 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; }
/** * 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; }
/** * 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; }
/** * Configures the CheckOptionHandler uses for testing the optionhandling. Sets * the search return from the getSearch() method. * * @return the fully configured CheckOptionHandler * @see #getSearch() */ protected CheckOptionHandler getOptionTester() { CheckOptionHandler result; result = new CheckOptionHandler(); result.setOptionHandler(getSearch()); result.setUserOptions(new String[0]); result.setSilent(true); return result; }
/** * Configures the CheckOptionHandler uses for testing the optionhandling. Sets * the classifier return from the getClassifier() method. * * @return the fully configured CheckOptionHandler * @see #getClassifier() */ protected CheckOptionHandler getOptionTester() { CheckOptionHandler result; result = new CheckOptionHandler(); result.setOptionHandler((OptionHandler) getClassifier()); result.setUserOptions(new String[0]); result.setSilent(true); return result; }
/** * Configures the CheckOptionHandler uses for testing the option handling. * Sets the NearestNeighbourSearch returned from the * getNearestNeighbourSearch() method * * @return the fully configured CheckOptionHandler * @see #getNearestNeighbourSearch() */ protected CheckOptionHandler getOptionTester() { CheckOptionHandler result; result = new CheckOptionHandler(); result.setOptionHandler(getNearestNeighbourSearch()); result.setUserOptions(new String[0]); result.setSilent(true); return result; }
/** * Configures the CheckOptionHandler uses for testing the optionhandling. Sets * the classifier return from the getClassifier() method. * * @return the fully configured CheckOptionHandler * @see #getClassifier() */ protected CheckOptionHandler getOptionTester() { CheckOptionHandler result; result = new CheckOptionHandler(); result.setOptionHandler((OptionHandler) getClassifier()); result.setUserOptions(new String[0]); result.setSilent(true); return result; }
/** * Configures the CheckOptionHandler uses for testing the option handling. * Sets the NearestNeighbourSearch returned from the * getNearestNeighbourSearch() method * * @return the fully configured CheckOptionHandler * @see #getNearestNeighbourSearch() */ protected CheckOptionHandler getOptionTester() { CheckOptionHandler result; result = new CheckOptionHandler(); result.setOptionHandler(getNearestNeighbourSearch()); result.setUserOptions(new String[0]); result.setSilent(true); return result; }
/** * Configures the CheckOptionHandler used for testing the optionhandling. * Sets the Associator returned from the getAssociator() method. * * @return the fully configured CheckOptionHandler * @see #getAssociator() */ protected CheckOptionHandler getOptionTester() { CheckOptionHandler result; result = new CheckOptionHandler(); if (getAssociator() instanceof OptionHandler) result.setOptionHandler((OptionHandler) getAssociator()); else result.setOptionHandler(null); result.setUserOptions(new String[0]); result.setSilent(true); return result; }
/** * 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(); if (getFilter() instanceof OptionHandler) result.setOptionHandler((OptionHandler) getFilter()); else result.setOptionHandler(null); result.setUserOptions(new String[0]); result.setSilent(true); return result; }