Polishing

This commit is contained in:
Sam Brannen
2022-11-04 16:03:47 +01:00
parent 638d91f5f4
commit a281d8c3fd
12 changed files with 27 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -227,12 +227,12 @@ public class ScriptTemplateView extends AbstractUrlBasedView {
engineCount++;
}
Assert.isTrue(engineCount == 1,
"You should define either 'engine', 'engineSupplier' or 'engineName'.");
"You should define either 'engine', 'engineSupplier', or 'engineName'.");
if (Boolean.FALSE.equals(this.sharedEngine)) {
Assert.isTrue(this.engine == null,
"When 'sharedEngine' is set to false, you should specify the " +
"script engine using 'engineName' or 'engineSupplier' , not 'engine'.");
"script engine using 'engineName' or 'engineSupplier', not 'engine'.");
}
else if (this.engine != null) {
loadScripts(this.engine);

View File

@@ -174,7 +174,7 @@ public class ScriptTemplateViewTests {
this.view.setRenderFunction("render");
assertThatIllegalArgumentException().isThrownBy(() ->
this.view.setApplicationContext(this.context))
.withMessageContaining("You should define either 'engine', 'engineSupplier' or 'engineName'.");
.withMessageContaining("You should define either 'engine', 'engineSupplier', or 'engineName'.");
}
@Test // gh-23258
@@ -185,7 +185,7 @@ public class ScriptTemplateViewTests {
this.view.setRenderFunction("render");
assertThatIllegalArgumentException().isThrownBy(() ->
this.view.setApplicationContext(this.context))
.withMessageContaining("You should define either 'engine', 'engineSupplier' or 'engineName'.");
.withMessageContaining("You should define either 'engine', 'engineSupplier', or 'engineName'.");
}
@Test // gh-23258
@@ -195,7 +195,7 @@ public class ScriptTemplateViewTests {
this.view.setRenderFunction("render");
assertThatIllegalArgumentException().isThrownBy(() ->
this.view.setApplicationContext(this.context))
.withMessageContaining("You should define either 'engine', 'engineSupplier' or 'engineName'.");
.withMessageContaining("You should define either 'engine', 'engineSupplier', or 'engineName'.");
}
@Test