use of com.axibase.tsd.api.model.message.Message in project atsd-api-test by axibase.
the class EqualCharEscapeTest method testEntity.
@Issue("2854")
@Test
public void testEntity() throws Exception {
Message message = new Message("message-command-test=-e4", "message-command-test-t4");
message.setMessage("message4");
message.setDate(getCurrentDate());
PlainCommand command = new MessageCommand(message);
CommandMethod.send(command);
assertMessageExisting("Inserted message can not be received", message);
}
use of com.axibase.tsd.api.model.message.Message in project atsd-api-test by axibase.
the class EqualCharEscapeTest method testType.
@Issue("2854")
@Test
public void testType() throws Exception {
Message message = new Message("message-command-test-e5", "message-command-=test-t5");
message.setMessage("message5");
message.setDate(getCurrentDate());
PlainCommand command = new MessageCommand(message);
CommandMethod.send(command);
assertMessageExisting("Inserted message can not be received", message);
}
use of com.axibase.tsd.api.model.message.Message in project atsd-api-test by axibase.
the class DQuoteCharEscapeTest method testEntity.
@Issue("2854")
@Test
public void testEntity() throws Exception {
Message message = new Message("message-command-test\"-e1", "message-command-test-t1");
message.setMessage("message1");
message.setDate(getCurrentDate());
PlainCommand command = new MessageCommand(message);
CommandMethod.send(command);
assertMessageExisting("Inserted message can not be received", message);
}
use of com.axibase.tsd.api.model.message.Message in project atsd-api-test by axibase.
the class MessageQueryStatsTest method insertMessages.
@BeforeClass
public void insertMessages() throws Exception {
Message message = new Message(MESSAGE_STATS_ENTITY, MESSAGE_STATS_TYPE);
message.setMessage("message-stats-test");
for (String date : DATES) {
message.setDate(date);
insertMessageCheck(message);
}
}
use of com.axibase.tsd.api.model.message.Message in project atsd-api-test by axibase.
the class MessageSeverityQueryTest method testMinSeverityFilter.
@Issue("2917")
@Test(dataProvider = "severities", description = "minSeverity is >= filter")
public void testMinSeverityFilter(Severity severity) throws Exception {
String key = severity.name();
Integer minimumSeverity = severity.getNumVal();
messageQuery.setMinSeverity(key);
List<Message> messages = queryMessageResponse(messageQuery).readEntity(new GenericType<List<Message>>() {
});
for (Message m : messages) {
int actualSeverity = valueOf(m.getSeverity()).getNumVal();
String errMessage = String.format("Received severity (%d) should be greater than minSeverity (%d)", actualSeverity, minimumSeverity);
assertTrue(errMessage, actualSeverity >= minimumSeverity);
}
}
Aggregations