Search in sources :

Example 1 with CommandModule

use of org.scijava.command.CommandModule in project imagej-ops by imagej.

the class RunningOpAsCommandTest method testRunCommand.

@Test
public void testRunCommand() throws InterruptedException, ExecutionException {
    final CommandService cs = context.service(CommandService.class);
    final CommandModule module = cs.run(Fibonacci.class, true, "n", 7).get();
    final int result = (Integer) module.getOutput("result");
    assertEquals(13, result);
}
Also used : CommandModule(org.scijava.command.CommandModule) CommandService(org.scijava.command.CommandService) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CommandModule (org.scijava.command.CommandModule)1 CommandService (org.scijava.command.CommandService)1