use of com.axibase.tsd.api.model.property.Property in project atsd-api-test by axibase.
the class PropertyInsertTest method testTagValueContainSpace.
@Issue("2416")
@Test
public void testTagValueContainSpace() throws Exception {
Property property = new Property("insert-property-t-7", "insert-property-e-7");
property.addTag("t1", " tv1 ");
property.setDate("2016-06-09T09:50:00.000Z");
Response response = insertProperty(property);
Property storedProperty = new Property(property);
storedProperty.setTags(null);
storedProperty.addTag("t1", "tv1");
assertEquals("Incorrect response status code", OK.getStatusCode(), response.getStatus());
assertTrue("Fail to get inserted properties", propertyExist(storedProperty));
}
use of com.axibase.tsd.api.model.property.Property in project atsd-api-test by axibase.
the class PropertyInsertTest method testLocalTimeUnsupported.
@Issue("2850")
@Test
public void testLocalTimeUnsupported() throws Exception {
String entityName = "property-insert-test-localtime";
String type = "test4";
Property property = new Property(type, entityName);
property.addTag("test", "test");
property.setDate("2016-06-09 20:00:00");
Response response = insertProperty(property);
assertEquals("Incorrect response status code", BAD_REQUEST.getStatusCode(), response.getStatus());
assertEquals("Error message mismatch", DATE_FILTER_INVALID_FORMAT, extractErrorMessage(response));
}
use of com.axibase.tsd.api.model.property.Property in project atsd-api-test by axibase.
the class PropertyInsertTest method testTimeRangeMaxTimeSaved.
@Issue("2957")
@Test
public void testTimeRangeMaxTimeSaved() throws Exception {
Property property = new Property("t-time-range-p-3", "e-time-range-p-3");
property.addTag("ttr-t", "ttr-v");
property.setDate(MAX_STORABLE_DATE);
Response response = insertProperty(property);
assertEquals("Failed to insert property", response.getStatus(), OK.getStatusCode());
assertTrue(propertyExist(property));
}
use of com.axibase.tsd.api.model.property.Property in project atsd-api-test by axibase.
the class PropertyInsertTest method testNoKeySamePropertyOverwrite.
/**
* #NoTicket - base tests
*/
@Test
public void testNoKeySamePropertyOverwrite() throws Exception {
final Property property = new Property("insert-type7", "insert-entity7");
property.addTag("t1", "tv1");
insertPropertyCheck(property);
final Property property2 = new Property();
property2.setType(property.getType());
property2.setEntity(property.getEntity());
property2.addTag("t2", "tv2");
insertPropertyCheck(property2);
assertFalse(propertyExist(property));
assertTrue(propertyExist(property2));
}
use of com.axibase.tsd.api.model.property.Property in project atsd-api-test by axibase.
the class PropertyInsertTest method testKeyValueContainSpace.
@Issue("2416")
@Test
public void testKeyValueContainSpace() throws Exception {
Property property = new Property("insert-property-t-5", "insert-property-e-5");
property.addKey("k1", " spaced ");
property.addTag("t1", "tv1");
property.setDate("2016-06-09T09:50:00.000Z");
Response response = insertProperty(property);
Property storedProperty = new Property(property);
storedProperty.setKey(null);
storedProperty.addKey("k1", "spaced");
assertEquals("Incorrect response status code", OK.getStatusCode(), response.getStatus());
assertTrue("Fail to get inserted properties", propertyExist(storedProperty));
}
Aggregations