JAL-3529 more detailed asserts to detect whitespace in DBRefs imported from Stockholm
authorJim Procter <jprocter@issues.jalview.org>
Fri, 14 Feb 2020 14:27:46 +0000 (14:27 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 14 Feb 2020 14:27:46 +0000 (14:27 +0000)
test/jalview/io/StockholmFileTest.java

index d8d524f..9004cdf 100644 (file)
@@ -119,6 +119,11 @@ public class StockholmFileTest
     AlignmentI fromStockholm = af.readFile(toStockholm,
             DataSourceType.PASTE, FileFormat.Stockholm);
     SequenceI importedSeq = fromStockholm.getSequenceAt(0);
+    assertTrue(importedSeq.getDBRefs().length == 1,
+            "Expected just one database reference to be added to sequence.");
+    assertTrue(
+            importedSeq.getDBRefs()[0].getAccessionId().indexOf(" ") == -1,
+            "Spaces were found in accession ID.");
     List<DBRefEntry> dbrefs = DBRefUtils.searchRefs(importedSeq.getDBRefs(),
             "P00224");
     assertTrue(dbrefs.size() == 1,