mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 00:59:34 +01:00
added a test case to test batch update without a modified url
Former-commit-id: 5d10d888c927f86a76f983011cab47d4c2725333
This commit is contained in:
@@ -82,4 +82,26 @@ public class DatabaseUpdaterTest {
|
|||||||
instance.deleteExistingData();
|
instance.deleteExistingData();
|
||||||
instance.update();
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user