Merge branch 'Jalview-JS/develop' into merge_js_develop
[jalview.git] / test / jalview / hmmer / HMMERTest.java
index 109575c..04cc3be 100644 (file)
@@ -1,6 +1,7 @@
 package jalview.hmmer;
 
 import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
@@ -19,6 +20,7 @@ import jalview.ws.params.simple.Option;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
+import java.util.List;
 
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
@@ -46,7 +48,7 @@ public class HMMERTest {
   @AfterClass(alwaysRun = true)
   public static void tearDownAfterClass() throws Exception
   {
-    Desktop.instance.closeAll_actionPerformed(null);
+    Desktop.getInstance().closeAll_actionPerformed(null);
   }
 
   /**
@@ -60,15 +62,15 @@ public class HMMERTest {
           throws MalformedURLException, IOException
   {
     /*
-     * run hmmbuild - note the side-effect of selecting the HMM
-     * sequence that gets added to the alignment
+     * run hmmbuild
      */
     testHMMBuild();
-    HiddenMarkovModel hmm = frame.getSelectedHMM();
-    assertNotNull(hmm);
+    List<SequenceI> hmms = frame.getViewport().getAlignment()
+            .getHmmSequences();
+    assertFalse(hmms.isEmpty());
 
     /*
-     * now run hmmalign - with respect to the select HMM profile
+     * now run hmmalign - by default with respect to the added HMM profile
      */
     testHMMAlign();
   }
@@ -118,8 +120,8 @@ public class HMMERTest {
     assertNotNull(original);
     AlignmentI realigned = alignFrames[1].getViewport().getAlignment();
     assertNotNull(realigned);
-    assertNotNull(original.getHmmConsensus());
-    assertNotNull(realigned.getHmmConsensus());
+    assertFalse(original.getHmmSequences().isEmpty());
+    assertFalse(realigned.getHmmSequences().isEmpty());
 
     SequenceI ferCapan = original.findName("FER_CAPAN");
     assertTrue(ferCapan.getSequenceAsString().startsWith("MA------SVSAT"));