Skip to content

Commit f5963f6

Browse files
committed
PR feedback - messages
1 parent b791241 commit f5963f6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/test/java/org/primeframework/mvc/test/BodyTools.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ public static String processTemplateWithMap(Path path, DetectionMap values)
105105
Set<Object> unusedVariables = values.getUnusedVariables("_",
106106
"actual");
107107
if (!unusedVariables.isEmpty()) {
108-
throw new IllegalArgumentException("Variables %s are not used in the [%s] template. If it's acceptable for the variable to not be used, wrap it in an Optional".formatted(unusedVariables.stream()
109-
.sorted()
110-
.toList(),
111-
path));
108+
throw new IllegalArgumentException("Unused values %s found in the [%s] template. If it's acceptable for the variable to be unused, wrap it in an Optional".formatted(unusedVariables.stream()
109+
.sorted()
110+
.toList(),
111+
path));
112112
}
113113
return writer.toString();
114114
} catch (TemplateException e) {

src/test/java/org/primeframework/mvc/test/BodyToolsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void processTemplateWithMap_unused_variables() throws Exception {
101101
} catch (Exception e) {
102102
assertEquals(e.getClass(), IllegalArgumentException.class,
103103
"Expected this exception type");
104-
assertEquals(e.getMessage(), "Variables [othervariable] are not used in the [src/test/web/templates/echo.ftl] template. If it's acceptable for the variable to not be used, wrap it in an Optional",
104+
assertEquals(e.getMessage(), "Unused values [othervariable] found in the [src/test/web/templates/echo.ftl] template. If it's acceptable for the variable to be unused, wrap it in an Optional",
105105
"othervariable is in the map but is not used");
106106
}
107107
}

0 commit comments

Comments
 (0)