Skip to content

Commit 50ca82b

Browse files
committed
Updated hello messages
1 parent e4149b2 commit 50ca82b

File tree

8 files changed

+8
-10
lines changed

8 files changed

+8
-10
lines changed

jvm-rainbow/src/main/java/nl/altindag/jvm/rainbow/GroovyService.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GroovyService implements GreetingsService {
1919

2020
@Override
2121
String hello() {
22-
"hello"
22+
"Greetings from Groovy!"
2323
}
2424

2525
}

jvm-rainbow/src/main/java/nl/altindag/jvm/rainbow/JavaService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class JavaService implements GreetingsService {
1919

2020
@Override
2121
public String hello() {
22-
return "hello";
22+
return "Greetings from Java!";
2323
}
2424

2525
}

jvm-rainbow/src/main/java/nl/altindag/jvm/rainbow/KotlinService.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ package nl.altindag.jvm.rainbow
1717

1818
class KotlinService : GreetingsService {
1919

20-
override fun hello(): String? {
21-
return "hello"
22-
}
20+
override fun hello(): String = "Greetings from Kotlin!"
2321

2422
}

jvm-rainbow/src/main/java/nl/altindag/jvm/rainbow/ScalaService.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ package nl.altindag.jvm.rainbow
1717

1818
class ScalaService extends GreetingsService {
1919

20-
override def hello(): String = "hello"
20+
override def hello(): String = "Greetings from Scala!"
2121

2222
}

jvm-rainbow/src/test/java/nl/altindag/jvm/rainbow/GroovyServiceShould.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class GroovyServiceShould extends GroovyTestCase {
2424
void testSayHello() {
2525
def service = new GroovyService()
2626
def message = service.hello()
27-
assertThat(message).isEqualTo("hello")
27+
assertThat(message).isEqualTo("Greetings from Groovy!")
2828
}
2929

3030
}

jvm-rainbow/src/test/java/nl/altindag/jvm/rainbow/JavaServiceShould.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ class JavaServiceShould {
2525
void sayHello() {
2626
var service = new JavaService();
2727
String message = service.hello();
28-
assertThat(message).isEqualTo("hello");
28+
assertThat(message).isEqualTo("Greetings from Java!");
2929
}
3030
}

jvm-rainbow/src/test/java/nl/altindag/jvm/rainbow/KotlinServiceShould.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class KotlinServiceShould {
2424
fun sayHello() {
2525
val service = KotlinService()
2626
val message = service.hello()
27-
assertThat(message).isEqualTo("hello")
27+
assertThat(message).isEqualTo("Greetings from Kotlin!")
2828
}
2929

3030
}

jvm-rainbow/src/test/java/nl/altindag/jvm/rainbow/ScalaServiceShould.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ScalaServiceShould extends AnyFunSpec {
2222
describe("say hello") {
2323
val service = new ScalaService()
2424
val message = service.hello()
25-
assert(message == "hello")
25+
assert(message == "Greetings from Scala!")
2626
}
2727

2828
}

0 commit comments

Comments
 (0)