X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fschemes%2FResiduePropertiesTest.java;h=28f39d858012fbd9df809ec33b54494c53c07628;hb=a7169b1c72607f3c9357195b4999869650a2a891;hp=41d74489c7abac509453d9617f40fc2725116b78;hpb=251bd6bbc7324e2235bb663b1b255317817957b1;p=jalview.git diff --git a/test/jalview/schemes/ResiduePropertiesTest.java b/test/jalview/schemes/ResiduePropertiesTest.java index 41d7448..28f39d8 100644 --- a/test/jalview/schemes/ResiduePropertiesTest.java +++ b/test/jalview/schemes/ResiduePropertiesTest.java @@ -27,11 +27,21 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; +import jalview.gui.JvOptionPane; + public class ResiduePropertiesTest { + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + /** * Test 'standard' codon translations (no ambiguity codes) */ @@ -212,7 +222,8 @@ public class ResiduePropertiesTest */ residues = ResidueProperties.getResidues(true, true); Collections.sort(residues); - assertEquals("[A, C, G, I, N, R, T, U, X, Y]", residues.toString()); + assertEquals("[A, B, C, D, G, H, I, K, M, N, R, S, T, U, V, W, X, Y]", + residues.toString()); } @Test(groups = { "Functional" }) @@ -1559,6 +1570,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 +1591,7 @@ public class ResiduePropertiesTest checkProperty("polar", "YWHRKTSNDEQ-*X"); checkProperty("positive", "HKR-*"); checkProperty("proline", "P-*"); - checkProperty("hydrophobic", "MILVFYWHKCGAC-*X"); + checkProperty("hydrophobic", "MILVFYWHKTGAC-*X"); } /**