Search in sources :

Example 21 with PlainCommand

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);
}
Also used : PlainCommand(com.axibase.tsd.api.model.command.PlainCommand) Property(com.axibase.tsd.api.model.property.Property) PropertyCommand(com.axibase.tsd.api.model.command.PropertyCommand) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 22 with PlainCommand

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);
}
Also used : PlainCommand(com.axibase.tsd.api.model.command.PlainCommand) Property(com.axibase.tsd.api.model.property.Property) PropertyCommand(com.axibase.tsd.api.model.command.PropertyCommand) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 23 with PlainCommand

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);
}
Also used : Entity(com.axibase.tsd.api.model.entity.Entity) PlainCommand(com.axibase.tsd.api.model.command.PlainCommand) EntityCommand(com.axibase.tsd.api.model.command.EntityCommand) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 24 with PlainCommand

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);
}
Also used : Entity(com.axibase.tsd.api.model.entity.Entity) PlainCommand(com.axibase.tsd.api.model.command.PlainCommand) EntityCommand(com.axibase.tsd.api.model.command.EntityCommand) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 25 with PlainCommand

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);
}
Also used : Entity(com.axibase.tsd.api.model.entity.Entity) PlainCommand(com.axibase.tsd.api.model.command.PlainCommand) EntityCommand(com.axibase.tsd.api.model.command.EntityCommand) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Aggregations

PlainCommand (com.axibase.tsd.api.model.command.PlainCommand)32 Issue (io.qameta.allure.Issue)31 Test (org.testng.annotations.Test)31 MessageCommand (com.axibase.tsd.api.model.command.MessageCommand)12 Message (com.axibase.tsd.api.model.message.Message)12 PropertyCommand (com.axibase.tsd.api.model.command.PropertyCommand)10 Property (com.axibase.tsd.api.model.property.Property)10 CommandMethodTest (com.axibase.tsd.api.extended.CommandMethodTest)5 SeriesCommand (com.axibase.tsd.api.model.command.SeriesCommand)5 Series (com.axibase.tsd.api.model.series.Series)5 EntityCommand (com.axibase.tsd.api.model.command.EntityCommand)4 Entity (com.axibase.tsd.api.model.entity.Entity)4 ArrayList (java.util.ArrayList)4 CommandSendingResult (com.axibase.tsd.api.model.extended.CommandSendingResult)2 SeriesCheck (com.axibase.tsd.api.method.checks.SeriesCheck)1 IOException (java.io.IOException)1