merge
[jalview.git] / test / jalview / schemes / ResiduePropertiesTest.java
index eb2ad45..b1d860e 100644 (file)
@@ -216,4 +216,23 @@ public class ResiduePropertiesTest
             "[ALA, ARG, ASN, ASP, ASX, CYS, GLN, GLU, GLX, GLY, HIS, ILE, LEU, LYS, MET, PHE, PRO, SER, THR, TRP, TYR, VAL, XAA]",
             residues.toString());
   }
+
+  @Test(groups = { "Functional" })
+  public void testGetCanonicalAminoAcid()
+  {
+    assertEquals("MET", ResidueProperties.getCanonicalAminoAcid("MET"));
+    assertEquals("MET", ResidueProperties.getCanonicalAminoAcid("MSE"));
+    assertEquals(null, ResidueProperties.getCanonicalAminoAcid(null));
+  }
+
+  @Test(groups = { "Functional" })
+  public void testGetSingleCharacterCode()
+  {
+    assertEquals('0', ResidueProperties.getSingleCharacterCode(null));
+    assertEquals('0', ResidueProperties.getSingleCharacterCode(null));
+    assertEquals('0', ResidueProperties.getSingleCharacterCode(""));
+    assertEquals('Q', ResidueProperties.getSingleCharacterCode("GLN"));
+    assertEquals('Q', ResidueProperties.getSingleCharacterCode("Gln"));
+    assertEquals('Q', ResidueProperties.getSingleCharacterCode("gln"));
+  }
 }