/** * checkEnvのテストケース 異常系:"BULKLOADER_HOME"が設定されていないケース * * @throws Exception */ @Test public void checkEnvTest01() throws Exception { ConfigurationLoader.init(properties_db, true, false); Map<String, String> m = new HashMap<String, String>(); m.put(Constants.ASAKUSA_HOME, ConfigurationLoader.getEnvProperty(Constants.ASAKUSA_HOME)); m.put(Constants.THUNDER_GATE_HOME, null); ConfigurationLoader.setEnv(m); UnitTestUtil.tearDownEnv(); try { ConfigurationLoader.checkEnv(); fail(); } catch (Exception e) { assertTrue(e instanceof Exception); System.out.println(e.getMessage()); e.printStackTrace(); } }
/** * clean up. * @throws Exception if failed */ @AfterClass public static void tearDownAfterClass() throws Exception { UnitTestUtil.tearDownEnv(); UnitTestUtil.tearDownAfterClass(); }