use of com.axibase.tsd.api.method.checks.DeletionCheck in project atsd-api-test by axibase.
the class TokenPropertyTest method testDeleteMethod.
@Test(description = "Tests properties delete endpoint with tokens.")
@Issue("6052")
public void testDeleteMethod() throws Exception {
Property propertyToDelete = // creating data for deletion
new Property(Mocks.propertyType(), Mocks.entity()).addTag(TAG_NAME, TAG_VALUE).setDate(ISO_TIME);
insertPropertyCheck(propertyToDelete);
String url = "/properties/delete";
String token = TokenRepository.getToken(username, HttpMethod.POST, url);
PropertyQuery query = new PropertyQuery(propertyToDelete.getType(), propertyToDelete.getEntity()).setStartDate(ISO_TIME).setEndDate(Util.MAX_QUERYABLE_DATE);
deleteProperty(Collections.singletonList(query), token);
Checker.check(new DeletionCheck(new PropertyCheck(propertyToDelete)));
}
use of com.axibase.tsd.api.method.checks.DeletionCheck in project atsd-api-test by axibase.
the class TokenReplacementTableTest method testDeleteMethod.
@Test(description = "Tests replacement table delete endpoint.")
@Issue("6052")
public void testDeleteMethod() throws Exception {
String replacementTableName = Mocks.replacementTable();
String url = "/replacement-tables/" + replacementTableName;
String token = TokenRepository.getToken(username, HttpMethod.DELETE, url);
ReplacementTable replacementTable = ReplacementTable.of(replacementTableName, SupportedFormat.JSON).addValue("key", "value");
createCheck(replacementTable);
deleteReplacementTableResponse(replacementTableName, token);
Checker.check(new DeletionCheck(new ReplacementTableCheck(replacementTable)));
}
Aggregations