Hello,
sonar lint 5.0 says Tests should include assertions (java:S2699) but my code with rest assured do testing.
@Test
public void testCreateUser() {
String username = "testCreateUser";
String user = buildJsonApiUser(username, "test");
// @formatter:off
given().
accept(JsonApiHttpMessageConverter.APPLICATION_JSON_API_VALUE).
contentType(JsonApiHttpMessageConverter.APPLICATION_JSON_API_VALUE).
body(user).
when().
post(UserController.RESOURCE).
then().
statusCode(201).
body("data.id", notNullValue()).
body("data.attributes.username", is(username)).
body("data.attributes.password", is(emptyOrNullString()));
// @formatter:on
}
Example of test which fails