Skip to content
Permalink
Browse files

Modifications for JSON test

  • Loading branch information...
dsand47 committed Aug 27, 2019
1 parent a984fba commit 04070851215d997a832eca01d8fcc65e92ed3e5f
@@ -144,11 +144,13 @@ public Block createNewBlock(@Nonnull String userName) {
*
* @param name the system name or the user name for the block
* @return a new or existing Block
* @throws IllegalArgumentException if cannot create block; never returns
* null
* @throws IllegalArgumentException if cannot create block or no name supplied; never returns null
*/
@Nonnull
public Block provideBlock(@Nonnull String name) {
if (name == null || name.isEmpty()) {
throw new IllegalArgumentException("Could not create block, no name supplied");
}
Block b = getBlock(name);
if (b != null) {
return b;
@@ -206,7 +206,6 @@ public void testDoPut() throws IOException, JsonException {
service.doPut(JsonBlock.BLOCK, "", message, locale, 0); // use an empty name to trigger exception
fail("Expected exception not thrown.");
} catch (JsonException ex) {
JUnitAppender.assertErrorMessageStartsWith("Invalid system name for Block");
assertEquals(400, ex.getCode());
}
}

0 comments on commit 0407085

Please sign in to comment.
You can’t perform that action at this time.