{
/**
- * test store and recovery of expanded views
+ * test store and recovery of all reachable cross refs from all reachable
+ * crossrefs for one or more fetched db refs. Currently, this test has a known
+ * failure case.
*
* @throws Exception
*/
List<String> keyseq = new ArrayList<String>();
HashMap<String, File> savedProjects = new HashMap<String, File>();
- for (String[] did : new String[][] { { "UNIPROT", "P01731" } })
+ for (String[] did : new String[][] { { "ENSEMBL", "ENSG00000157764" },
+ { "UNIPROT", "P01731" } })
{
// pass counters - 0 - first pass, 1 means retrieve project rather than
// perform action
AlignmentTest.assertAlignmentDatasetRefs(af.getViewport()
.getAlignment(), "Pass (" + pass1 + "," + pass2 + ","
+ pass3 + "): Fetch " + first + ":");
+ assertDatasetIsNormalisedKnownDefect(af.getViewport()
+ .getAlignment(), "Pass (" + pass1 + "," + pass2 + ","
+ + pass3 + "): Fetch " + first + ":");
dna = af.getViewport().getAlignment().isNucleotide();
retral = af.getViewport().getAlignment();
dataset = retral.getDataset();
AlignmentTest.assertAlignmentDatasetRefs(af.getViewport()
.getAlignment(), "Pass (" + pass1 + "," + pass2 + ","
+ pass3 + "): Recover " + first + ":");
+ assertDatasetIsNormalisedKnownDefect(af.getViewport()
+ .getAlignment(), "Pass (" + pass1 + "," + pass2 + ","
+ + pass3 + "): Recover " + first + ":");
}
"Pass (" + pass1 + "," + pass2 + "," + pass3
+ "): before start of pass3: " + nextxref
+ ":");
+ assertDatasetIsNormalisedKnownDefect(avp.getAlignment(),
+ "Pass (" + pass1 + "," + pass2 + "," + pass3
+ + "): before start of pass3: " + nextxref
+ + ":");
SequenceI[] xrseqs = avp.getAlignment().getSequencesArray();
nextavp.getAlignment(), "" + "Pass (" + pass1
+ "," + pass2 + "): For "
+ nextnextxref + ":");
+ assertDatasetIsNormalisedKnownDefect(
+ nextavp.getAlignment(), "" + "Pass (" + pass1
+ + "," + pass2 + "): For "
+ + nextnextxref + ":");
stringify(dbtoviewBit, savedProjects, nextnextxref,
nextavp);
else
{
pass1++;
- if (pass1 < 2)
- {
- // verify stored projects for second set of cross references
- pass2 = 1;
- // and verify cross-references retrievable from those stored projects.
- pass3 = 0;
- }
}
- } while (pass3 < 2);
+ } while (pass1 < 3);
}
if (failedXrefMenuItems.size() > 0)
{
}
}
+ /**
+ * wrapper to trap known defect for AH002001 testcase
+ *
+ * @param alignment
+ * @param string
+ */
+ private void assertDatasetIsNormalisedKnownDefect(AlignmentI al,
+ String message)
+ {
+ try
+ {
+ AlignmentTest.assertDatasetIsNormalised(al, message);
+ } catch (AssertionError ae)
+ {
+ if (!ae.getMessage().endsWith("EMBL|AH002001"))
+ {
+ throw ae;
+ }
+ else
+ {
+ System.out
+ .println("Ignored exception for known defect: JAL-2179 : "
+ + message);
+ }
+
+ }
+ }
+
private void assertProtein(AlignmentViewPanel alignmentViewPanel,
String message)
{