temp push
[jalview.git] / test / jalview / structure / StructureSelectionManagerTest.java
index a882bce..dab692f 100644 (file)
@@ -27,6 +27,7 @@ import static org.testng.AssertJUnit.assertTrue;
 
 import jalview.analysis.AlignmentUtils;
 import jalview.api.structures.JalviewStructureDisplayI;
+import jalview.bin.Cache;
 import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
@@ -46,6 +47,7 @@ import jalview.io.FileLoader;
 import jalview.io.Jalview2xmlBase;
 import jalview.io.StructureFile;
 import jalview.util.MapList;
+import jalview.ws.DBRefFetcher;
 import jalview.ws.sifts.SiftsSettings;
 
 import java.util.ArrayList;
@@ -197,7 +199,7 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase
   {
     // for some reason 'BeforeMethod' (which should be inherited from
     // Jalview2XmlBase isn't always called)...
-    Desktop.instance.closeAll_actionPerformed(null);
+    Desktop.getInstance().closeAll_actionPerformed(null);
     try { 
       Thread.sleep(200);
     } catch (Exception foo) {}; 
@@ -349,6 +351,9 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase
   public void testAssociatedMappingToSubSeq() throws Exception
   {
 
+    // currently this test fails if trimming is enabled
+    Cache.setProperty(DBRefFetcher.TRIM_RETRIEVED_SEQUENCES,
+            Boolean.FALSE.toString());
     String TEMP_FACTOR_AA="Temperature Factor";
     String PDBID = "4IM2";
     String FullLengthSeq = ">TBK1_HUMAN Serine/threonine-protein kinase TBK1\n" + 
@@ -413,7 +418,7 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase
             PDBID);
 
     AlignmentAnnotation subseq_tf=null;
-    assertTrue(seq.getDBRefs() != null && seq.getDBRefs().length > 0);
+    assertTrue(seq.getDBRefs() != null && seq.getDBRefs().size() > 0);
     
     if (!al.findAnnotations(seq, null, TEMP_FACTOR_AA).iterator().hasNext())
     {