use of com.axibase.tsd.api.model.command.StringCommand in project atsd-api-test by axibase.
the class EntityCommandTest method testIncorrectEnabled.
@Issue("3550")
@Issue("6319")
@Test(dataProvider = "incorrectEnabledProvider")
public void testIncorrectEnabled(String enabled) throws Exception {
String entityName = Mocks.entity();
StringCommand command = new StringCommand(String.format("entity e:%s b:%s", entityName, enabled));
String assertMessage = "Bad entity was accepted :: " + command.toString();
assertFalse(assertMessage, transport.send(command));
Response serverResponse = EntityMethod.getEntityResponse(entityName);
assertEquals(assertMessage, NOT_FOUND.getStatusCode(), serverResponse.getStatus());
}
use of com.axibase.tsd.api.model.command.StringCommand in project atsd-api-test by axibase.
the class MetricCommandTest method testIncorrectVersioning.
@Issue("3137")
@Issue("6319")
@Test(dataProvider = "incorrectInterpolationFieldProvider")
public void testIncorrectVersioning(String value) throws Exception {
String metricName = metric();
StringCommand incorrectCommand = new StringCommand(String.format("metric m:%s v:%s", metricName, value));
String assertMessage = String.format("Metric with incorrect versioning field (%s) shouldn't be inserted", value);
assertFalse(assertMessage, transport.send(incorrectCommand));
}
use of com.axibase.tsd.api.model.command.StringCommand in project atsd-api-test by axibase.
the class MetricCommandTest method testIncorrectDataType.
@Issue("3137")
@Issue("6319")
@Test(dataProvider = "incorrectDataTypeFieldProvider")
public void testIncorrectDataType(String value) throws Exception {
String metricName = metric();
StringCommand incorrectCommand = new StringCommand(String.format("metric m:%s p:%s", metricName, value));
String assertMessage = String.format("Metric with incorrect type field (%s) shouldn't be inserted", value);
assertFalse(assertMessage, transport.send(incorrectCommand));
}
use of com.axibase.tsd.api.model.command.StringCommand in project atsd-api-test by axibase.
the class EntityCommandTest method testRawEnabled.
@Issue("3550")
@Issue("6319")
@Test(dataProvider = "correctEnabledProvider")
public void testRawEnabled(String enabled) throws Exception {
String entityName = Mocks.entity();
Entity entity = new Entity(entityName);
StringCommand command = new StringCommand(String.format("entity e:%s b:%s", entityName, enabled));
String assertMessage = "Failed to set enabled (raw)";
assertTrue(assertMessage, transport.send(command));
Checker.check(new EntityCheck(entity));
Entity actualEntity = EntityMethod.getEntity(entityName);
assertEquals(assertMessage, enabled.replaceAll("[\\'\\\"]", ""), actualEntity.getEnabled().toString());
}
use of com.axibase.tsd.api.model.command.StringCommand in project atsd-api-test by axibase.
the class MetricCommandTest method testIncorrectInterpolation.
@Issue("3137")
@Issue("6319")
@Test(dataProvider = "incorrectInterpolationFieldProvider")
public void testIncorrectInterpolation(String value) throws Exception {
String metricName = metric();
StringCommand incorrectCommand = new StringCommand(String.format("metric m:%s i:%s", metricName, value));
String assertMessage = String.format("Metric with incorrect interpolate field (%s) shouldn't be inserted", value);
assertFalse(assertMessage, transport.send(incorrectCommand));
}
Aggregations