@Test(groups = { "Operational" }, enabled = true)
public void testRetrieveAndShowCrossref() throws Exception
{
+ List<String> failedXrefMenuItems = new ArrayList<String>();
// for every set of db queries
// retrieve db query
// verify presence of expected xrefs
{ // retrieve and show cross-refs in this thread
cra = new CrossRefAction(af, seqs, dna, db);
cra.run();
- Assert.assertTrue(cra.getXrefViews().size() > 0,
- "No crossrefs retrieved for " + db);
+ if (cra.getXrefViews().size() == 0)
+ {
+ failedXrefMenuItems.add("No crossrefs retrieved for "
+ + first + " -> " + db);
+ continue;
+ }
cra_views = cra.getXrefViews();
assertNucleotide(cra_views.get(0),
"Nucleotide panel included proteins for " + first
cra = new CrossRefAction(nextaf, xrseqs, avp
.getAlignViewport().isNucleotide(), xrefdb);
cra.run();
- Assert.assertTrue(
- cra.getXrefViews().size() > 0,
- "No crossrefs found for '" + nextnextxref
- + "' to " + xrefdb + " via '"
- + nextaf.getTitle() + "'");
+ if (cra.getXrefViews().size() == 0)
+ {
+ failedXrefMenuItems
+ .add("No crossrefs retrieved for '"
+ + nextxref + "' to " + xrefdb + " via '"
+ + nextaf.getTitle() + "'");
+ continue;
+ }
cra_views2 = cra.getXrefViews();
assertNucleotide(cra_views2.get(0),
"Nucleotide panel included proteins for '"
}
} while (pass3 < 2);
}
+ if (failedXrefMenuItems.size() > 0)
+ {
+ StringBuilder sb = new StringBuilder();
+ for (String s : failedXrefMenuItems)
+ {
+ sb.append(s + "\n");
+ }
+ Assert.fail("Faulty xref menu (" + failedXrefMenuItems.size()
+ + " counts)\n" + sb.toString());
+ }
}
private void assertProtein(AlignmentViewPanel alignmentViewPanel,