renamed getFile to getDataFile and added a no frills getFile function

Former-commit-id: 26c515de47c1ec510c1249e7caab0b69ef189523
This commit is contained in:
Jeremy Long
2013-11-26 05:35:40 -05:00
parent ee6dd0e794
commit 9dfc25559e
2 changed files with 23 additions and 7 deletions

View File

@@ -64,16 +64,16 @@ public class SettingsTest {
}
/**
* Test of getFile method, of class Settings.
* Test of getDataFile method, of class Settings.
*/
@Test
public void testGetFile() throws IOException {
public void testGetDataFile() throws IOException {
String key = Settings.KEYS.CVE_DATA_DIRECTORY;
String expResult = "data" + File.separator + "cve";
File result = Settings.getFile(key);
File result = Settings.getDataFile(key);
Assert.assertTrue(result.getAbsolutePath().endsWith(expResult));
result = Settings.getFile(Settings.KEYS.DATA_DIRECTORY);
result = Settings.getDataFile(Settings.KEYS.DATA_DIRECTORY);
String path = result.getPath();
Assert.assertTrue(path.endsWith("data") || path.endsWith("data" + File.separator));
}