ConfigurationLoader { public Configuration load(String filepath) throws Exception { Assertion.on("filepath").mustNotBeNull(filepath); return load(new FileInputStream(new File(filepath))); }  Configuration load(String filepath); Configuration load(InputStream is);  }
@Test public void load_A$String() throws Exception { ConfigurationLoader target = new ConfigurationLoader(); String filepath = "release/junithelper-config.properties"; Configuration actual = target.load(filepath); assertNotNull(actual); assertThat(actual.isExtensionEnabled, is(equalTo(false))); }
@Test public void load_A$String_T$Exception() throws Exception { ConfigurationLoader target = new ConfigurationLoader(); String filepath = null; try { target.load(filepath); fail("Expected exception was not thrown!"); } catch (Exception e) { } }
@Test public void load_A$InputStream() throws Exception { ConfigurationLoader target = new ConfigurationLoader(); InputStream is = IOUtil.getResourceAsStream("junithelper-config.properties"); Configuration actual = target.load(is); assertNotNull(actual); }
@Test public void load_A$InputStream_T$Exception() throws Exception { ConfigurationLoader target = new ConfigurationLoader(); InputStream is = null; try { target.load(is); fail("Expected exception was not thrown!"); } catch (Exception e) { } }
@Test public void load_A$String_StringIsNull() throws Exception { ConfigurationLoader target = new ConfigurationLoader(); String filepath = null; try { target.load(filepath); fail(); } catch (JUnitHelperCoreException e) { } }
@Test public void load_A$String_StringIsEmpty() throws Exception { ConfigurationLoader target = new ConfigurationLoader(); String filepath = ""; try { target.load(filepath); fail(); } catch (FileNotFoundException e) { } }