diff --git a/src/main/java/IntroLab.java b/src/main/java/IntroLab.java index fa5d6e2..8207fa5 100644 --- a/src/main/java/IntroLab.java +++ b/src/main/java/IntroLab.java @@ -40,7 +40,9 @@ public static String printLabMessage(String greeting, String name, * As a reference, we've provided the sample method exampleStudent. * Make sure you document your method properly! */ - + public static String zhouzi81() { + return printLabMessage("Hello", "Michael", true, "Nice to meet you!"); + } /** * An example method that calls on printLabMessage. */ @@ -59,6 +61,7 @@ public static void main(final String[] args) { * As a reference, we've provided a sample call to exampleStudent * above. Afterwards: run this file to see the output! */ + System.out.println(zhouzi81()); } diff --git a/src/test/java/IntroLabTest.java b/src/test/java/IntroLabTest.java index 4572da6..9e538d5 100644 --- a/src/test/java/IntroLabTest.java +++ b/src/test/java/IntroLabTest.java @@ -17,7 +17,7 @@ public void setUp() { public void tearDown() { } - @Test(timeout = 10) + @Test(timeout = 100) public void testExampleStudent() { String expected = "Hello! My name is Stu Dent! " + "I like cats more than dogs! Welcome to CSC207!"; @@ -30,4 +30,10 @@ public void testExampleStudent() { * the test results. * As a reference, we've included testExampleStudent above. */ + public void testzhouzi81() { + String expected = "Hello! My name is Michael! " + + "I like cats more than dogs! Nice to meet you!"; + String actual = IntroLab.zhouzi81(); + assertEquals(expected, actual); + } }