Skip to content

Commit

Permalink
Fix Java templates issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gvdongen committed Nov 21, 2024
1 parent d3e5029 commit 283ec6f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions templates/java-gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ application {

tasks.named<Test>("test") {
useJUnitPlatform()
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ void testGreet(@RestateClient Client ingressClient) {
var client = GreeterClient.fromClient(ingressClient);

String response = client.greet("Francesco");
assertEquals(response, "Hello Francesco");
assertEquals(response, "You said hi to Francesco!");
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package my.example;
package com.example.restatestarter;

// You can remove this file.
// It's only purpose is providing stubs for the template.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spring.application.name=restate-starter
greetingPrefix=Hello Mr.
greetingPrefix=hi

# Restate SDK port (to expose Greeter)
restate.sdk.http.port=9080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@SpringBootTest(
classes = Greeter.class,
properties = {"greetingPrefix=Ciao "})
properties = {"greetingPrefix=ciao"})
@RestateTest
public class GreeterTest {

Expand All @@ -30,6 +30,6 @@ public class GreeterTest {
void greet(@RestateClient Client ingressClient) {
var client = GreeterClient.fromClient(ingressClient);

assertThat(client.greet("Francesco")).isEqualTo("Ciao Francesco");
assertThat(client.greet("Francesco")).isEqualTo("You said ciao to Francesco!");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ void testGreet(@RestateClient Client ingressClient) {
var client = GreeterClient.fromClient(ingressClient);

String response = client.greet("Francesco");
assertEquals(response, "Hello Francesco");
assertEquals(response, "You said hi to Francesco!");
}
}

0 comments on commit 283ec6f

Please sign in to comment.