/** * StringTest tests a few functions of the String class. * * @author Joe Student * @version 2014.5.10 */ public class StringTest extends junit.framework.TestCase { /** * Default constructor for test class StringTest */ public StringTest() { } /** * Sets up the test fixture. * * Called before every test case method. */ public void setUp() { } /** * Tears down the test fixture. * * Called after every test case method. */ public void tearDown() { } public void testCharAt() { String dog = "Dog";; char first = dog.charAt(0); assertEquals('D',first); } public void testToLower() { String upper = "HAPPYDAYS"; String lower = upper.toLowerCase(); assertEquals("happydays",lower); } }