Example usage for org.apache.commons.configuration MapConfiguration getInt

List of usage examples for org.apache.commons.configuration MapConfiguration getInt

Introduction

In this page you can find the example usage for org.apache.commons.configuration MapConfiguration getInt.

Prototype

public int getInt(String key) 

Source Link

Usage

From source file:org.debux.webmotion.server.ConfigurationTest.java

@Test
public void testMap() throws ConfigurationException {
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("test", "10");
    map.put("var", "${test}");

    MapConfiguration configuration = new MapConfiguration(map);
    AssertJUnit.assertEquals(10, configuration.getInt("test"));
    AssertJUnit.assertEquals(10, configuration.getInt("var"));
}