System.getProperties().remove( "drools.dialect.default" );
}
public void testIgnoreDefaults() {
// check standard chained properties, that includes defaults
ChainedProperties chainedProperties = new ChainedProperties( "packagebuilder.conf",
getClass().getClassLoader(),
true );
//System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
// null ) );
assertNotNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
null ) );
// now check that chained properties can ignore defaults
chainedProperties = new ChainedProperties( "packagebuilder.conf",
getClass().getClassLoader(),
false );
//System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
// null ) );
assertNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
null ) );
// now check it can find defaults again.
chainedProperties = new ChainedProperties( "packagebuilder.conf",
getClass().getClassLoader(),
true );
//System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
// null ) );
assertNotNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
null ) );
}