use of org.scijava.util.ByteArray in project imagej-omero by imagej.
the class UploadTableTest method testByteArrayTable.
@Test
public void testByteArrayTable() throws ServerError, PermissionDeniedException, CannotCreateSessionException, ExecutionException, DSOutOfServiceException, DSAccessException {
final GenericTable table = new DefaultGenericTable();
final DefaultColumn<ByteArray> ij0 = new DefaultColumn<>(ByteArray.class);
final DefaultColumn<ByteArray> ij1 = new DefaultColumn<>(ByteArray.class);
ij0.add(new ByteArray(new byte[] { -128, 127 }));
ij0.add(new ByteArray(new byte[] { 0, 10 }));
ij1.add(new ByteArray(new byte[] { 112, 42 }));
ij1.add(new ByteArray(new byte[] { -13, -84 }));
table.add(ij0);
table.add(ij1);
// Create expectations
setUpMethodCalls();
final long id = service.uploadTable(credentials, "table", table, 0);
assertEquals(id, -1);
// NB: Can only capture in a Verifications block
new Verifications() {
{
TableData td;
tablesFacility.addTable((SecurityContext) any, (ImageData) any, anyString, td = withCapture());
tableEquals(table, td, Long[].class);
}
};
}
Aggregations