@Test public void testReadPropertyNotExist() throws Exception { String resultExcepted = null; String resultActual = PropertiesUtil.readProperty("db", "wew"); BaseLogger.info("resultExcepted = " + resultExcepted); BaseLogger.info("resultActual = " + resultActual); Assert.assertEquals(resultExcepted, resultActual); }
@Test public void testReadPropertyExist() throws Exception { String resultExcepted = "jdbc:oracle:thin"; String resultActual = PropertiesUtil.readProperty("db", "database.jdbc.connectionURL"); BaseLogger.info("resultExcepted = " + resultExcepted); BaseLogger.info("resultActual = " + resultActual); Assert.assertEquals(true, resultActual.startsWith(resultExcepted)); }
public static void main(String[] args) { // TODO Auto-generated method stub BaseLogger.getInstance().addLog("test"); BaseLogger.getInstance().printLog(); }