use of net.imagej.table.CharTable in project imagej-omero by imagej.
the class UploadTableTest method testCharTable.
@Test
public void testCharTable() throws ServerError, PermissionDeniedException, CannotCreateSessionException, ExecutionException, DSOutOfServiceException, DSAccessException {
final CharTable table = new DefaultCharTable(5, 2);
table.get(0).fill(new char[] { 'q', 'V' });
table.get(1).fill(new char[] { '2', '$' });
table.get(2).fill(new char[] { 'b', 'a' });
table.get(3).fill(new char[] { '\t', '\n' });
table.get(4).fill(new char[] { '.', ' ' });
// 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, String.class);
}
};
}
Aggregations