use of com.axibase.tsd.api.model.command.EntityCommand 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.EntityCommand 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);
}
use of com.axibase.tsd.api.model.command.EntityCommand in project atsd-api-test by axibase.
the class EntityCommandTest method testEnabled.
@Issue("3550")
@Test
public void testEnabled() throws Exception {
Entity entity = new Entity(entity());
entity.setEnabled(true);
EntityCommand command = new EntityCommand(entity);
CommandMethod.send(command);
Checker.check(new EntityCheck(entity));
Entity actualEntity = EntityMethod.getEntity(entity.getName());
assertTrue("Failed to set enabled", actualEntity.getEnabled());
}
use of com.axibase.tsd.api.model.command.EntityCommand in project atsd-api-test by axibase.
the class EntityCommandTest method testDisabled.
@Issue("3550")
@Test
public void testDisabled() throws Exception {
Entity entity = new Entity(entity());
entity.setEnabled(false);
EntityCommand command = new EntityCommand(entity);
CommandMethod.send(command);
Checker.check(new EntityCheck(entity));
Entity actualEntity = EntityMethod.getEntity(entity.getName());
assertFalse("Failed to set disabled", actualEntity.getEnabled());
}
Aggregations