Merge remote-tracking branch 'origin/bug/JAL-3082selectRegex' into merge/JAL-3082
[jalview.git] / test / jalview / schemes / ResiduePropertiesTest.java
index be6a10c..180deaf 100644 (file)
@@ -23,15 +23,25 @@ package jalview.schemes;
 import static org.testng.AssertJUnit.assertEquals;
 import static org.testng.AssertJUnit.assertNull;
 
+import jalview.gui.JvOptionPane;
+
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class ResiduePropertiesTest
 {
 
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   /**
    * Test 'standard' codon translations (no ambiguity codes)
    */
@@ -1559,6 +1569,16 @@ public class ResiduePropertiesTest
   }
 
   @Test(groups = { "Functional" })
+  public void testGetDssp3State()
+  {
+    assertNull(ResidueProperties.getDssp3state(null));
+    assertEquals("", ResidueProperties.getDssp3state(""));
+    String foo = "0123 []<>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+    String bar = "                                    E  E HHH                 ";
+    assertEquals(bar, ResidueProperties.getDssp3state(foo));
+  }
+
+  @Test(groups = { "Functional" })
   public void testPhysicoChemicalProperties()
   {
     checkProperty("aromatic", "FYWH-*");