@Test(expected = SaaSSystemException.class) public void testGetIntValueInvalidFormat() throws Exception { ConfigurationSetting cs = new ConfigurationSetting(); cs.setContextId("some_context"); cs.setInformationId(ConfigurationKey.LOG_LEVEL); cs.setValue("some value"); cs.getIntValue(); }
@Test public void testGetIntValue() throws Exception { ConfigurationSetting cs = new ConfigurationSetting(); cs.setContextId("some_context"); cs.setInformationId(ConfigurationKey.LOG_LEVEL); cs.setValue("12345"); Assert.assertEquals(12345, cs.getIntValue()); }