JAL-2049 use HGVS notation for variant on protein residue
[jalview.git] / test / jalview / util / StringUtilsTest.java
index d072cc6..4dc44d4 100644 (file)
@@ -206,4 +206,16 @@ public class StringUtilsTest
     assertEquals(1, StringUtils.compareVersions("12", "2"));
     assertEquals(1, StringUtils.compareVersions("3.12.11", "3.2.4"));
   }
+
+  @Test(groups = { "Functional" })
+  public void testToSentenceCase()
+  {
+    assertEquals("John", StringUtils.toSentenceCase("john"));
+    assertEquals("John", StringUtils.toSentenceCase("JOHN"));
+    assertEquals("John and james",
+            StringUtils.toSentenceCase("JOHN and JAMES"));
+    assertEquals("J", StringUtils.toSentenceCase("j"));
+    assertEquals("", StringUtils.toSentenceCase(""));
+    assertNull(StringUtils.toSentenceCase(null));
+  }
 }