Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Walter Knize <[email protected]>
  • Loading branch information
nknize committed Dec 16, 2021
1 parent 1d5962e commit b3dae8b
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ public void testParseUnknownParam() throws Exception {
templateDef.put("mapping", Collections.singletonMap("store", true));
templateDef.put("random_param", "random_value");

IllegalArgumentException e = expectThrows(
IllegalArgumentException.class,
() -> DynamicTemplate.parse("my_template", templateDef)
);
IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> DynamicTemplate.parse("my_template", templateDef));
assertEquals("Illegal dynamic template parameter: [random_param]", e.getMessage());
}

Expand All @@ -63,10 +60,7 @@ public void testParseUnknownMatchType() {
templateDef2.put("match_mapping_type", "text");
templateDef2.put("mapping", Collections.singletonMap("store", true));
// if a wrong match type is specified, we ignore the template
IllegalArgumentException e = expectThrows(
IllegalArgumentException.class,
() -> DynamicTemplate.parse("my_template", templateDef2)
);
IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> DynamicTemplate.parse("my_template", templateDef2));
assertEquals(
"No field type matched on [text], possible values are [object, string, long, double, boolean, date, binary]",
e.getMessage()
Expand Down

0 comments on commit b3dae8b

Please sign in to comment.