@Test
public void testCreateDeleteBasicAlertDefinitionNoneDampening() throws Exception {
int definitionId=0;
try {
AlertDefinition alertDefinition = new AlertDefinition();
alertDefinition.setName("-x-test-definition");
alertDefinition.setEnabled(false);
alertDefinition.setPriority("LOW");
alertDefinition.setDampeningCategory("NONE");
AlertDefinition result =
given()
.header(acceptJson)
.contentType(ContentType.JSON)
.body(alertDefinition)
.queryParam("resourceId",_platformId)
.expect()
.statusCode(201)
.body("dampeningCategory",is("NONE"))
.body("dampeningCount",is(0))
.body("dampeningPeriod",is(0))
.when()
.post("/alert/definitions")
.as(AlertDefinition.class);
definitionId = result.getId();
} finally {
cleanupDefinition(definitionId);
}
}