From: Jim Procter Date: Mon, 15 Jun 2015 10:42:52 +0000 (+0100) Subject: JAL-1775 fix broken test due to missing file (RF0031_unfolded). X-Git-Tag: Release_2_10_0~608^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f0658e24fa038198d566d8adfb75f0fd4915d3aa;p=jalview.git JAL-1775 fix broken test due to missing file (RF0031_unfolded). --- diff --git a/test/jalview/ws/jabaws/RNAStructExportImport.java b/test/jalview/ws/jabaws/RNAStructExportImport.java index 36b3196..c1c3357 100644 --- a/test/jalview/ws/jabaws/RNAStructExportImport.java +++ b/test/jalview/ws/jabaws/RNAStructExportImport.java @@ -23,6 +23,17 @@ package jalview.ws.jabaws; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.AlignmentI; +import jalview.gui.Jalview2XML; +import jalview.io.AnnotationFile; +import jalview.io.FormatAdapter; +import jalview.io.StockholmFileTest; +import jalview.ws.jws2.Jws2Discoverer; +import jalview.ws.jws2.RNAalifoldClient; +import jalview.ws.jws2.SequenceAnnotationWSClient; +import jalview.ws.jws2.jabaws2.Jws2Instance; +import jalview.ws.params.AutoCalcSetting; import java.awt.Component; import java.util.ArrayList; @@ -32,25 +43,15 @@ import javax.swing.JMenu; import javax.swing.JMenuItem; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import compbio.metadata.WrongParameterException; -import jalview.datamodel.AlignmentI; -import jalview.gui.Jalview2XML; -import jalview.io.AnnotationFile; -import jalview.io.FormatAdapter; -import jalview.io.StockholmFileTest; -import jalview.ws.jws2.Jws2Discoverer; -import jalview.ws.jws2.RNAalifoldClient; -import jalview.ws.jws2.SequenceAnnotationWSClient; -import jalview.ws.jws2.jabaws2.Jws2Instance; -import jalview.ws.params.AutoCalcSetting; - public class RNAStructExportImport { - public static String testseqs = "examples/unfolded_RF00031.aln"; + public static String testseqs = "examples/RF00031_folded.stk"; public static Jws2Discoverer disc; @@ -89,6 +90,22 @@ public class RNAStructExportImport assertNotNull("Couldn't load test data ('" + testseqs + "')", af); + // remove any existing annotation + List aal = new ArrayList(); + for (AlignmentAnnotation rna : af.getViewport().getAlignment() + .getAlignmentAnnotation()) + { + if (rna.isRNA()) + { + aal.add(rna); + } + } + for (AlignmentAnnotation rna : aal) + { + af.getViewport().getAlignment().deleteAnnotation(rna); + } + af.getViewport().alignmentChanged(af.alignPanel); // why is af.alignPanel + // public? } @AfterClass