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

Former-commit-id: 641a227e3a3d47ee4b9c6bc897b49c010f36adf9
This commit is contained in:
Jeremy Long
2013-08-31 06:48:59 -04:00
parent 3fe196e4ec
commit b7323543b3

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);
}
}