use of site.ycsb.ByteIterator in project YCSB by brianfrankcooper.
the class RestClientTest method update_404.
@Test
public void update_404() {
HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
Status status = rc.update(null, ABSENT_RESOURCE, data);
assertEquals(Status.NOT_FOUND, status);
}
use of site.ycsb.ByteIterator in project YCSB by brianfrankcooper.
the class RestClientTest method insert_500.
@Test
public void insert_500() {
HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
Status status = rc.insert(null, INVALID_RESOURCE, data);
assertEquals(Status.ERROR, status);
}
use of site.ycsb.ByteIterator in project YCSB by brianfrankcooper.
the class RestClientTest method update_403.
@Test
public void update_403() {
HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
Status status = rc.update(null, UNAUTHORIZED_RESOURCE, data);
assertEquals(Status.FORBIDDEN, status);
}
use of site.ycsb.ByteIterator in project YCSB by brianfrankcooper.
the class RestClientTest method insert_403.
@Test
public void insert_403() {
HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
Status status = rc.insert(null, UNAUTHORIZED_RESOURCE, data);
assertEquals(Status.FORBIDDEN, status);
}
use of site.ycsb.ByteIterator in project YCSB by brianfrankcooper.
the class RestClientTest method insert_200.
// Insert success.
@Test
public void insert_200() {
HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
Status status = rc.insert(null, VALID_RESOURCE, data);
assertEquals(Status.OK, status);
}
Aggregations