public String getProperty(String name) { return delegate.getProperty(name); }
@Test public void testClockTypeConfiguration() { // setting the option using the type safe method config.setOption( ClockTypeOption.get("pseudo") ); // checking the type safe getOption() method assertEquals( ClockTypeOption.get("pseudo"), config.getOption( ClockTypeOption.class ) ); // checking the string based getProperty() method assertEquals( "pseudo", config.getProperty( ClockTypeOption.PROPERTY_NAME ) ); // setting the options using the string based setProperty() method config.setProperty( ClockTypeOption.PROPERTY_NAME, "realtime" ); // checking the type safe getOption() method assertEquals( ClockTypeOption.get("realtime"), config.getOption( ClockTypeOption.class ) ); // checking the string based getProperty() method assertEquals( "realtime", config.getProperty( ClockTypeOption.PROPERTY_NAME ) ); }
@Test public void testBeliefSystemType() { config.setOption( BeliefSystemTypeOption.get( BeliefSystemType.JTMS.toString() ) ); assertEquals( BeliefSystemTypeOption.get( BeliefSystemType.JTMS.toString() ), config.getOption( BeliefSystemTypeOption.class ) ); // checking the string based getProperty() method assertEquals( BeliefSystemType.JTMS.getId(), config.getProperty( BeliefSystemTypeOption.PROPERTY_NAME ) ); // setting the options using the string based setProperty() method config.setProperty( BeliefSystemTypeOption.PROPERTY_NAME, BeliefSystemType.DEFEASIBLE.getId() ); // checking the type safe getOption() method assertEquals( BeliefSystemTypeOption.get( BeliefSystemType.DEFEASIBLE.getId() ), config.getOption( BeliefSystemTypeOption.class ) ); // checking the string based getProperty() method assertEquals( BeliefSystemType.DEFEASIBLE.getId(), config.getProperty( BeliefSystemTypeOption.PROPERTY_NAME ) ); }