use of com.axibase.tsd.api.model.command.MessageCommand in project atsd-api-test by axibase.
the class BackslashNoEscapeTest method testType.
@Issue("2854")
@Test
public void testType() throws Exception {
Message message = new Message("message-command-test-e8", "message-command-\\test-t8");
message.setMessage("message8");
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.command.MessageCommand in project atsd-api-test by axibase.
the class DoubleBackslashNoEscapeTest method testType.
@Issue("2854")
@Test
public void testType() throws Exception {
Message message = new Message("message-command-test-e11", "message-command-\\\\test-t11");
message.setMessage("message11");
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.command.MessageCommand in project atsd-api-test by axibase.
the class LengthTest method testMaxLength.
@Issue("2412")
@Test
public void testMaxLength() throws Exception {
final Message message = new Message("e-message-max-cmd-length", "t-message-max-cmd-length");
message.setDate(getCurrentDate());
message.setSeverity(Severity.MAJOR.name());
message.setMessage("");
MessageCommand command = new MessageCommand(message);
Integer currentLength = command.compose().length();
String newMessage = new String(new char[MAX_LENGTH - currentLength]).replace("\0", "m");
message.setMessage(newMessage);
command = new MessageCommand(message);
assertEquals("Command length is not maximal", command.compose().length(), MAX_LENGTH);
CommandMethod.send(command);
assertMessageExisting("Inserted message can not be received", message);
}
use of com.axibase.tsd.api.model.command.MessageCommand 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);
}
Aggregations