added a test case to test batch update without a modified url

Former-commit-id: 5d10d888c927f86a76f983011cab47d4c2725333
This commit is contained in:
Jeremy Long
2013-08-31 06:48:59 -04:00
parent eac470e081
commit 6b416b8494

View File

@@ -82,4 +82,26 @@ public class DatabaseUpdaterTest {
instance.deleteExistingData();
instance.update();
}
/**
* Test of update method (when in batch mode), of class DatabaseUpdater.
*
* @throws Exception
*/
@Test
public void testBatchUpdateWithoutModified() throws Exception {
//setup - consider moving this to its own test case file so it has a different setup/teardown.
final String tmp12 = Settings.getString(Settings.KEYS.CVE_MODIFIED_12_URL);
final String tmp20 = Settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL);
Settings.removeProperty(Settings.KEYS.CVE_MODIFIED_12_URL);
Settings.removeProperty(Settings.KEYS.CVE_MODIFIED_20_URL);
DatabaseUpdater instance = new DatabaseUpdater();
instance.deleteExistingData();
instance.update();
//restore defaults
Settings.setString(Settings.KEYS.CVE_MODIFIED_12_URL, tmp12);
Settings.setString(Settings.KEYS.CVE_MODIFIED_20_URL, tmp20);
}
}