mirror of
https://github.com/Dannecron/netology-devops-teamcity-example.git
synced 2025-12-25 23:32:35 +03:00
add feature
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
package plaindoll;
|
||||
|
||||
import org.joda.time.LocalTime;
|
||||
|
||||
public class HelloPlayer{
|
||||
public static void main(String[] args) {
|
||||
LocalTime currentTime = new LocalTime();
|
||||
System.out.println("The current local time is: " + currentTime);
|
||||
Welcomer welcomer = new Welcomer();
|
||||
System.out.println(welcomer.sayWelcome());
|
||||
System.out.println(welcomer.sayFarewell());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,7 @@ public class Welcomer{
|
||||
public String sayWelcome() {
|
||||
return "Welcome home, good hunter. What is it your desire?";
|
||||
}
|
||||
public String sayFarewell() {
|
||||
return "Farewell, good hunter. May you find your worth in waking world.";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,5 +13,12 @@ public class WelcomerTest {
|
||||
public void welcomerSaysWelcome() {
|
||||
assertThat(welcomer.sayWelcome(), containsString("Welcome"));
|
||||
}
|
||||
public void welcomerSaysFarewell() {
|
||||
assertThat(welcomer.sayFarewell(), containsString("Farewell"));
|
||||
}
|
||||
public void welcomerSaysHunter() {
|
||||
assertThat(welcomer.SaysWelcome(), containsString("hunter"));
|
||||
assertThat(welcomer.sayFarewell(), containsString("hunter"));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user