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:
11
pom.xml
11
pom.xml
@@ -6,7 +6,7 @@
|
||||
<groupId>org.netology</groupId>
|
||||
<artifactId>example-maven</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.1.0</version>
|
||||
<version>0.2.0</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
@@ -14,21 +14,12 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- tag::joda[] -->
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<!-- end::joda[] -->
|
||||
<!-- tag::junit[] -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- end::junit[] -->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -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