use of com.yahoo.ycsb.ByteIterator in project YCSB by brianfrankcooper.
the class RestClientTest method update_500.
@Test
public void update_500() {
HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
Status status = rc.update(null, INVALID_RESOURCE, data);
assertEquals(Status.ERROR, status);
}
use of com.yahoo.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);
}
use of com.yahoo.ycsb.ByteIterator in project YCSB by brianfrankcooper.
the class RestClientTest method update_200.
@Test
public void update_200() {
HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
Status status = rc.update(null, VALID_RESOURCE, data);
assertEquals(Status.OK, status);
}
use of com.yahoo.ycsb.ByteIterator in project YCSB by brianfrankcooper.
the class RestClientTest method read_500.
// Server error.
@Test
public void read_500() {
HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>();
Status status = rc.read(null, INVALID_RESOURCE, null, result);
assertEquals(Status.ERROR, status);
}
use of com.yahoo.ycsb.ByteIterator in project YCSB by brianfrankcooper.
the class RestClientTest method read_403.
// Unauthorized request error.
@Test
public void read_403() {
HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>();
Status status = rc.read(null, UNAUTHORIZED_RESOURCE, null, result);
assertEquals(Status.FORBIDDEN, status);
}
Aggregations