Search in sources :

Example 1 with DefaultBoolTable

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

the class UploadTableTest method testBoolTable.

@Test
public void testBoolTable() throws ServerError, PermissionDeniedException, CannotCreateSessionException, ExecutionException, DSOutOfServiceException, DSAccessException {
    final BoolTable table = new DefaultBoolTable(2, 4);
    table.get(0).fill(new boolean[] { true, true, false, false });
    table.get(1).fill(new boolean[] { true, false, true, false });
    // 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, Boolean.class);
        }
    };
}
Also used : BoolTable(net.imagej.table.BoolTable) DefaultBoolTable(net.imagej.table.DefaultBoolTable) DefaultBoolTable(net.imagej.table.DefaultBoolTable) Verifications(mockit.Verifications) TableData(omero.gateway.model.TableData) Test(org.junit.Test)

Aggregations

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