Skip to content

Commit

Permalink
Additional testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rhwood committed Feb 27, 2019
1 parent 46f79a1 commit 5dfa26d
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ public void testDoPut() {
} catch (JsonException ex) {
Assert.fail(ex.getMessage());
}
// add a reporter with invalid name
Assert.assertNull(manager.getReporter("JR1"));
message = mapper.createObjectNode().put(JSON.NAME, "JR1").put(JsonReporter.REPORT, "close");
try {
service.doPut(REPORTER, "JR1", message, Locale.ENGLISH);
Assert.fail("JR1 should not have been created");
} catch (JsonException ex) {
Assert.assertEquals("400 name was invalid", 400, ex.getCode());
}
}

@Test
Expand Down

0 comments on commit 5dfa26d

Please sign in to comment.