Search in sources :

Example 1 with LongTable

use of net.imagej.table.LongTable in project imagej-omero by imagej.

the class UploadTableTest method testLongTable.

@Test
public void testLongTable() throws ServerError, PermissionDeniedException, CannotCreateSessionException, ExecutionException, DSOutOfServiceException, DSAccessException {
    final LongTable table = new DefaultLongTable(2, 2);
    table.get(0).fill(new long[] { 9223372036854775807l, 0 });
    table.get(1).fill(new long[] { -9223372036854775808l, 4 });
    // 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);
        }
    };
}
Also used : DefaultLongTable(net.imagej.table.DefaultLongTable) LongTable(net.imagej.table.LongTable) DefaultLongTable(net.imagej.table.DefaultLongTable) Verifications(mockit.Verifications) TableData(omero.gateway.model.TableData) Test(org.junit.Test)

Aggregations

Verifications (mockit.Verifications)1 DefaultLongTable (net.imagej.table.DefaultLongTable)1 LongTable (net.imagej.table.LongTable)1 TableData (omero.gateway.model.TableData)1 Test (org.junit.Test)1