|
|
|
|
@ -41,10 +41,10 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_21;
@@ -41,10 +41,10 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_21;
|
|
|
|
|
* @author Sebastien Deleuze |
|
|
|
|
*/ |
|
|
|
|
@DisabledForJreRange(min = JAVA_21, disabledReason = "Kotlin doesn't support Java 21+ yet") |
|
|
|
|
public class KotlinScriptTemplateTests { |
|
|
|
|
class KotlinScriptTemplateTests { |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void renderTemplateWithFrenchLocale() throws Exception { |
|
|
|
|
void renderTemplateWithFrenchLocale() throws Exception { |
|
|
|
|
Map<String, Object> model = new HashMap<>(); |
|
|
|
|
model.put("foo", "Foo"); |
|
|
|
|
String url = "org/springframework/web/reactive/result/view/script/kotlin/template.kts"; |
|
|
|
|
@ -53,7 +53,7 @@ public class KotlinScriptTemplateTests {
@@ -53,7 +53,7 @@ public class KotlinScriptTemplateTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void renderTemplateWithEnglishLocale() throws Exception { |
|
|
|
|
void renderTemplateWithEnglishLocale() throws Exception { |
|
|
|
|
Map<String, Object> model = new HashMap<>(); |
|
|
|
|
model.put("foo", "Foo"); |
|
|
|
|
String url = "org/springframework/web/reactive/result/view/script/kotlin/template.kts"; |
|
|
|
|
@ -62,7 +62,7 @@ public class KotlinScriptTemplateTests {
@@ -62,7 +62,7 @@ public class KotlinScriptTemplateTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void renderTemplateWithoutRenderFunction() throws Exception { |
|
|
|
|
void renderTemplateWithoutRenderFunction() throws Exception { |
|
|
|
|
Map<String, Object> model = new HashMap<>(); |
|
|
|
|
model.put("header", "<html><body>"); |
|
|
|
|
model.put("hello", "Hello"); |
|
|
|
|
|