use of com.axibase.tsd.api.model.command.PlainCommand in project atsd-api-test by axibase.
the class DQuoteCharEscapeTest method testEntity.
@Issue("2854")
@Test
public void testEntity() throws Exception {
Property property = new Property("property-command-test-t2", "property-command-test\"\"-e2");
property.setTags(DEFAULT_PROPERTY_TAGS);
property.setDate(getCurrentDate());
PlainCommand command = new PropertyCommand(property);
CommandMethod.send(command);
assertPropertyExisting("Inserted property can not be received", property);
}
use of com.axibase.tsd.api.model.command.PlainCommand in project atsd-api-test by axibase.
the class EqualCharEscapeTest method testType.
@Issue("2854")
@Test
public void testType() throws Exception {
Property property = new Property("property-command-test=-t3", "property-command-test-e3");
property.setTags(DEFAULT_PROPERTY_TAGS);
property.setDate(getCurrentDate());
PlainCommand command = new PropertyCommand(property);
CommandMethod.send(command);
property.setType(property.getType().replace("\"", ""));
assertPropertyExisting("Inserted property can not be received", property);
}
use of com.axibase.tsd.api.model.command.PlainCommand in project atsd-api-test by axibase.
the class EntityCommandTest method testUpdateEntityTagsForExistEntity.
@Issue("3111")
@Test
public void testUpdateEntityTagsForExistEntity() throws Exception {
Entity storedEntityUpdateTags = new Entity("e-for-test-update-tags");
storedEntityUpdateTags.addTag(E_TAG_1, E_VAL_1);
createOrReplaceEntityCheck(storedEntityUpdateTags);
storedEntityUpdateTags.setTags(Collections.singletonMap(E_TAG_1, E_VAL_1_UPD));
PlainCommand command = new EntityCommand(storedEntityUpdateTags);
CommandMethod.send(command);
assertEntityExisting("Entity tag isn't update for existing entity.", storedEntityUpdateTags);
}
use of com.axibase.tsd.api.model.command.PlainCommand in project atsd-api-test by axibase.
the class EntityCommandTest method testNewEntityTagsForNewEntity.
@Issue("3111")
@Test
public void testNewEntityTagsForNewEntity() throws Exception {
Entity storedEntityForTags = new Entity("e-for-test-add-tags");
storedEntityForTags.addTag(E_TAG_1, E_VAL_1);
PlainCommand command = new EntityCommand(storedEntityForTags);
CommandMethod.send(command);
String assertMessage = String.format("Failed to check entity with updated tags %s", storedEntityForTags.getTags());
assertEntityExisting(assertMessage, storedEntityForTags);
}
use of com.axibase.tsd.api.model.command.PlainCommand in project atsd-api-test by axibase.
the class EntityCommandTest method testAddNewEntityTagForExistEntity.
@Issue("3111")
@Test
public void testAddNewEntityTagForExistEntity() throws Exception {
Entity storedEntityWithTags = new Entity("e-with-tags");
storedEntityWithTags.addTag(E_TAG_1, E_VAL_1);
createOrReplaceEntityCheck(storedEntityWithTags);
storedEntityWithTags.addTag(E_TAG_2, E_VAL_2);
PlainCommand command = new EntityCommand(storedEntityWithTags);
CommandMethod.send(command);
assertEntityExisting("Entity tag isn't add for existing entity", storedEntityWithTags);
}
Aggregations