public void testRetrieveAndShowCrossref() throws Exception
{
List<String> failedXrefMenuItems = new ArrayList<String>();
+ List<String> failedProjectRecoveries = new ArrayList<String>();
+
// for every set of db queries
// retrieve db query
// verify presence of expected xrefs
Desktop.instance.closeAll_actionPerformed(null);
pass3 = 0;
// recover stored project
+ File storedProject = savedProjects.get(nextxref);
+ if (storedProject == null)
+ {
+ failedProjectRecoveries.add("Failed to store a view for '"
+ + nextxref + "'");
+ continue;
+ }
+
+ // recover stored project
AlignFrame af2 = new FileLoader(false)
.LoadFileWaitTillLoaded(savedProjects.get(nextxref)
.toString(), FormatAdapter.FILE);
{
Desktop.instance.closeAll_actionPerformed(null);
// recover stored project
+ File storedProject = savedProjects.get(nextnextxref);
+ if (storedProject == null)
+ {
+ failedProjectRecoveries
+ .add("Failed to store a view for '"
+ + nextnextxref + "'");
+ continue;
+ }
AlignFrame af2 = new FileLoader(false)
.LoadFileWaitTillLoaded(
savedProjects.get(nextnextxref)
}
if (failedXrefMenuItems.size() > 0)
{
- StringBuilder sb = new StringBuilder();
for (String s : failedXrefMenuItems)
{
- sb.append(s + "\n");
+ System.err.println(s);
}
Assert.fail("Faulty xref menu (" + failedXrefMenuItems.size()
- + " counts)\n" + sb.toString());
+ + " counts)");
+ }
+ if (failedProjectRecoveries.size() > 0)
+ {
+
+ for (String s : failedProjectRecoveries)
+ {
+ System.err.println(s);
+ }
+ Assert.fail("Didn't recover projects for some retrievals (did they retrieve ?) ("
+ + failedProjectRecoveries.size() + " counts)");
}
}