/** * Executes the graph using a new default {@link GraphContext}. * * @param graph the {@link Graph} * @param pm a progress monitor. Can be used to signal progress. * * @throws GraphException if any error occurs during execution * @see GraphProcessor#executeGraph(GraphContext, com.bc.ceres.core.ProgressMonitor) */ public void executeGraph(Graph graph, ProgressMonitor pm) throws GraphException { GraphContext graphContext; try { pm.beginTask("Executing processing graph", 100); graphContext = new GraphContext(graph); executeGraph(graphContext, SubProgressMonitor.create(pm, 90)); graphContext.dispose(); } finally { pm.done(); } }
graphContext.dispose();
assertEquals("N2", targetProducts[0].getName()); graphContext.dispose();
assertEquals("N3", targetProducts[0].getName()); graphContext.dispose();
assertEquals("N6", outputProducts[1].getName()); graphContext.dispose();
assertEquals("N5", outputProducts[2].getName()); graphContext.dispose();