JAL-2154 catch insertion of duplicate CDS after retrieve cross-references with Alignm...
authorJim Procter <jprocter@issues.jalview.org>
Mon, 29 Aug 2016 11:10:10 +0000 (12:10 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 29 Aug 2016 11:10:10 +0000 (12:10 +0100)
test/jalview/io/CrossRef2xmlTests.java

index e7a6950..080bda8 100644 (file)
@@ -114,6 +114,9 @@ public class CrossRef2xmlTests extends Jalview2xmlBase
           AlignmentTest.assertAlignmentDatasetRefs(af.getViewport()
                   .getAlignment(), "Pass (" + pass1 + "," + pass2 + ","
                   + pass3 + "): Fetch " + first + ":");
+          AlignmentTest.assertDatasetIsNormalised(af.getViewport()
+                  .getAlignment(), "Pass (" + pass1 + "," + pass2 + ","
+                  + pass3 + "): Fetch " + first + ":");
           dna = af.getViewport().getAlignment().isNucleotide();
           retral = af.getViewport().getAlignment();
           dataset = retral.getDataset();
@@ -137,6 +140,9 @@ public class CrossRef2xmlTests extends Jalview2xmlBase
           AlignmentTest.assertAlignmentDatasetRefs(af.getViewport()
                   .getAlignment(), "Pass (" + pass1 + "," + pass2 + ","
                   + pass3 + "): Recover " + first + ":");
+          AlignmentTest.assertDatasetIsNormalised(af.getViewport()
+                  .getAlignment(), "Pass (" + pass1 + "," + pass2 + ","
+                  + pass3 + "): Recover " + first + ":");
 
         }
 
@@ -229,6 +235,10 @@ public class CrossRef2xmlTests extends Jalview2xmlBase
                       "Pass (" + pass1 + "," + pass2 + "," + pass3
                               + "): before start of pass3: " + nextxref
                               + ":");
+              AlignmentTest.assertDatasetIsNormalised(avp.getAlignment(),
+                      "Pass (" + pass1 + "," + pass2 + "," + pass3
+                              + "): before start of pass3: " + nextxref
+                              + ":");
 
               SequenceI[] xrseqs = avp.getAlignment().getSequencesArray();
 
@@ -341,6 +351,10 @@ public class CrossRef2xmlTests extends Jalview2xmlBase
                             nextavp.getAlignment(), "" + "Pass (" + pass1
                                     + "," + pass2 + "): For "
                                     + nextnextxref + ":");
+                    AlignmentTest.assertDatasetIsNormalised(
+                            nextavp.getAlignment(), "" + "Pass (" + pass1
+                                    + "," + pass2 + "): For "
+                                    + nextnextxref + ":");
 
                     stringify(dbtoviewBit, savedProjects, nextnextxref,
                             nextavp);