X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fschemes%2FResiduePropertiesTest.java;h=180deafa944ee28b2ab8f9bd3404168723a1e1af;hb=refs%2Fheads%2Fbug%2FJAL-3744_read_gzip_file_in_jalviewjs;hp=41d74489c7abac509453d9617f40fc2725116b78;hpb=251bd6bbc7324e2235bb663b1b255317817957b1;p=jalview.git diff --git a/test/jalview/schemes/ResiduePropertiesTest.java b/test/jalview/schemes/ResiduePropertiesTest.java index 41d7448..180deaf 100644 --- a/test/jalview/schemes/ResiduePropertiesTest.java +++ b/test/jalview/schemes/ResiduePropertiesTest.java @@ -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-*"); @@ -1570,7 +1590,7 @@ public class ResiduePropertiesTest checkProperty("polar", "YWHRKTSNDEQ-*X"); checkProperty("positive", "HKR-*"); checkProperty("proline", "P-*"); - checkProperty("hydrophobic", "MILVFYWHKCGAC-*X"); + checkProperty("hydrophobic", "MILVFYWHKTGAC-*X"); } /**