Skip to content

Commit 18ae320

Browse files
committed
Add a untested method
1 parent 8b10012 commit 18ae320

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

junit5/src/main/java/io/mincong/junit5/StringConcatenationChatBot.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,14 @@ public class StringConcatenationChatBot implements ChatBot {
66
public String sayHello(String username) {
77
return "Hello, " + username;
88
}
9+
10+
/**
11+
* In IntelliJ IDEA, run ChatBotTest with coverage and observe the test coverage here. You can see
12+
* that this test is not tested. One advantage of using parameterized testing is that it can
13+
* increase the test coverage easily with difference scenarios.
14+
*/
15+
@SuppressWarnings("unused")
16+
public String sayNo(String username) {
17+
return "No, " + username;
18+
}
919
}

0 commit comments

Comments
 (0)