+ @Test
+ public void test_deltaWithNoPrior() throws FileNotFoundException, IOException, SAXException
+ {
+ String[][] bugSpecs = {
+ { DM_DEFAULT_ENCODING, "DM_DEFAULT_ENCODING" },
+ { RCN_REDUNDANT_NULL_CHECK, "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" },
+ { VO_VOLATILE_INCREMENT, "VO_VOLATILE_INCREMENT" },
+ { DM_NUMBER_CTOR_156, "DM_NUMBER_CTOR" },
+ { DM_NUMBER_CTOR_169, "DM_NUMBER_CTOR" }
+ };
+
+ final String PROJECT_NAME = "AlphaOne";
+ String secondXml = buildXml(bugSpecs, 0, bugSpecs.length - 1);
+
+ Analysis second = analysisFromXml(secondXml, PROJECT_NAME, "1.0.1");
+
+ Delta delta = new Delta(null, second);
+
+ assertNotNull(delta);
+ for (int i = 0; i < bugSpecs.length; ++i) {
+ assertFalse(contains(delta.getCommon(), bugSpecs[i][1]));
+ assertFalse(contains(delta.getFixed(), bugSpecs[i][1]));
+ assertTrue(contains(delta.getNew(), bugSpecs[i][1]));
+ }
+ }