Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/IntroLab.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ public static String printLabMessage(String greeting, String name,
/**
* An example method that calls on printLabMessage.
*/
public static String exampleStudent() {
return printLabMessage("Hello", "Stu Dent", true,
public static String lkhagvaj() {
return printLabMessage("Hello", "Enkhzul", true,
"Welcome to CSC207!");
}


public static void main(final String[] args) {
System.out.println(exampleStudent());
System.out.println(lkhagvaj());

/* TODO: Add a call to the method you wrote in this main method,
* and print the results of it.
Expand Down
12 changes: 10 additions & 2 deletions src/test/java/IntroLabTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public void tearDown() {

@Test(timeout = 10)
public void testExampleStudent() {
String expected = "Hello! My name is Stu Dent! " +
String expected = "Hello! My name is Enkhzul! " +
"I like cats more than dogs! Welcome to CSC207!";
String actual = IntroLab.exampleStudent();
String actual = IntroLab.lkhagvaj();
assertEquals(expected, actual);
}

Expand All @@ -30,4 +30,12 @@ public void testExampleStudent() {
* the test results.
* As a reference, we've included testExampleStudent above.
*/
@Test(timeout = 10)
public void testExampleStudent2() {
String expected = "Hello! My name is Enkhzul! " +
"I like cats more than dogs! Welcome to CSC207!";
String actual = IntroLab.lkhagvaj();
assertEquals(expected, actual);
}
}