use of com.axibase.tsd.api.method.checks.Check in project atsd-api-test by axibase.
the class PropertyTest method assertPropertyTypeExist.
public static void assertPropertyTypeExist(String propertyType) {
String assertMessage = String.format("Fail to find property type %s in ATSD", propertyType);
try {
Check propertyCheck = new Check(assertMessage, () -> PropertyTest.propertyTypeExist(propertyType));
Checker.check(propertyCheck);
} catch (NotCheckedException e) {
fail(assertMessage);
}
}
use of com.axibase.tsd.api.method.checks.Check in project atsd-api-test by axibase.
the class MessageTest method assertMessageExist.
/**
* Try to find provided message in ATSD, and check that found message has the same values of the specified
* fields as the provided message.
*/
public static void assertMessageExist(Message message, String... fields) {
String assertMessage = String.format("Fail to find in ATSD message: %s", message);
try {
Check messageCheck = new Check(assertMessage, () -> MessageMethod.messageExistWithSameFields(message, "entity", "message"));
Checker.check(messageCheck, 10, TimeUnit.SECONDS);
} catch (NotCheckedException e) {
fail(assertMessage);
}
}
use of com.axibase.tsd.api.method.checks.Check in project atsd-api-test by axibase.
the class EntityTest method assertEntityNameExist.
/**
* Checks that ATSD knows some entity with given name.
*/
public static void assertEntityNameExist(String entityName) {
String errorMessage = String.format("ATSD does not know entity %s.", entityName);
Check entityNameCheck = new Check(errorMessage, () -> EntityMethod.entityExist(entityName));
try {
Checker.check(entityNameCheck);
} catch (NotCheckedException e) {
fail(errorMessage);
}
}
Aggregations