mirror of
https://github.com/Dannecron/netology-devops-teamcity-example.git
synced 2025-12-25 23:32:35 +03:00
add class
This commit is contained in:
12
src/main/java/hello/HelloPlayer.java
Normal file
12
src/main/java/hello/HelloPlayer.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package hello;
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
7
src/main/java/hello/Welcomer.java
Normal file
7
src/main/java/hello/Welcomer.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package hello;
|
||||
|
||||
public class Welcomer{
|
||||
public String sayWelcome() {
|
||||
return "Welcome back, Good Hunter!";
|
||||
}
|
||||
}
|
||||
17
src/test/java/hello/GreeterTest.java
Normal file
17
src/test/java/hello/GreeterTest.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package hello;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class WelcomerTest {
|
||||
|
||||
private Welcomer welcomer = new Welcomer();
|
||||
|
||||
@Test
|
||||
public void welcomerSaysWelcome() {
|
||||
assertThat(welcomer.sayWelcome(), containsString("Welcome"));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user