From e1dbbc5edc07f65706eeb1dda9f4c9bcdee9d3a5 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 18 May 2020 11:01:29 +0100 Subject: [PATCH] JAL-3529 test updated for revised signature of getDBRefs() --- test/jalview/io/StockholmFileTest.java | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index 9fdd7b9..5b74306 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -26,17 +26,6 @@ import static org.testng.AssertJUnit.assertNotNull; import static org.testng.AssertJUnit.assertTrue; import static org.testng.AssertJUnit.fail; -import jalview.datamodel.Alignment; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.Annotation; -import jalview.datamodel.DBRefEntry; -import jalview.datamodel.Sequence; -import jalview.datamodel.SequenceFeature; -import jalview.datamodel.SequenceI; -import jalview.gui.JvOptionPane; -import jalview.util.DBRefUtils; - import java.io.File; import java.util.Arrays; import java.util.BitSet; @@ -50,6 +39,17 @@ import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; +import jalview.datamodel.Alignment; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.Annotation; +import jalview.datamodel.DBRefEntry; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceFeature; +import jalview.datamodel.SequenceI; +import jalview.gui.JvOptionPane; +import jalview.util.DBRefUtils; + public class StockholmFileTest { @@ -125,10 +125,12 @@ public class StockholmFileTest AlignmentI fromStockholm = af.readFile(toStockholm, DataSourceType.PASTE, FileFormat.Stockholm); SequenceI importedSeq = fromStockholm.getSequenceAt(0); - assertTrue(importedSeq.getDBRefs().length == 1, + assertTrue(importedSeq.getDBRefs() + .size() == 1, "Expected just one database reference to be added to sequence."); assertTrue( - importedSeq.getDBRefs()[0].getAccessionId().indexOf(" ") == -1, + importedSeq.getDBRefs().get(0).getAccessionId().indexOf( + " ") == -1, "Spaces were found in accession ID."); List dbrefs = DBRefUtils.searchRefs(importedSeq.getDBRefs(), "P00224"); -- 1.7.10.2