agave-tags/tags-api/src/test/java/org/iplantc/service/tags/resources/impl/TagResourceImplIT.java
/**
	 * Parses standard response stanza for the actual body and code
	 * 
	 * @param representation
	 * @param shouldSucceed
	 * @return
	 * @throws JSONException
	 * @throws IOException
	 */
Parses standard response stanza for the actual body and code


Parses standard response stanza for the actual body and code
private JsonNode verifyResponse(Representation representation, boolean shouldSucceed) throws IOException
	{
		String responseBody = representation.getText();
		assertNotNull(responseBody, "Null body returned");
		JsonNode json = mapper.readTree(responseBody);
		if (shouldSucceed) {
			assertEquals(json.get("status").asText().toLowerCase(), "success", "Error when success should have occurred");
		} else {
			assertEquals(json.get("status").asText().toLowerCase(), "error", "Success when error should have occurred");
		}
		return json.get("result");
	}
private JsonNode verifyResponse ( Representation representation , boolean shouldSucceed ) throws IOException { String responseBody = representation . getText ( ) ; assertNotNull ( responseBody , "Null body returned" ) ; JsonNode json = mapper . readTree ( responseBody ) ; if ( shouldSucceed ) { assertEquals ( json . get ( "status" ) . asText ( ) . toLowerCase ( ) , "success" , "Error when success should have occurred" ) ; } else { assertEquals ( json . get ( "status" ) . asText ( ) . toLowerCase ( ) , "error" , "Success when error should have occurred" ) ; } return json . get ( "result" ) ; }
Parses standard response stanza for the actual body and code
Parses standard response stanza for the actual body and code