@Test public void testBooleanAbnormal() { MyConfigurationManager myManager = new MyConfigurationManager(); DefaultTypedProperty<Boolean> p = (DefaultTypedProperty<Boolean>) myManager.getProperty("bool", "bKey", "True "); assertTrue(p.typedValue().booleanValue()); p = (DefaultTypedProperty<Boolean>) myManager.getProperty("bool", "bKey", " True "); assertTrue(p.typedValue().booleanValue()); p = (DefaultTypedProperty<Boolean>) myManager.getProperty("bool", "bKey", " True"); assertTrue(p.typedValue().booleanValue()); p = (DefaultTypedProperty<Boolean>) myManager.getProperty("bool", "bKey", "TURE"); assertFalse(p.typedValue().booleanValue()); p = (DefaultTypedProperty<Boolean>) myManager.getProperty("bool", "bKey", "FALSE"); assertFalse(p.typedValue().booleanValue()); p = (DefaultTypedProperty<Boolean>) myManager.getProperty("bool", "bKey", "qwdqwd123"); assertFalse(p.typedValue().booleanValue()); }
@Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); }
DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager { @Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); } }
DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager { @Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); } DefaultTypedConfigurationManager(ConfigurationManager manager); }
DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager { @Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); } DefaultTypedConfigurationManager(ConfigurationManager manager); @Override TypedProperty<T> getProperty(String key, ValueParser<T> valueParser); }
DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager { @Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); } DefaultTypedConfigurationManager(ConfigurationManager manager); @Override TypedProperty<T> getProperty(String key, ValueParser<T> valueParser);  }