1 package org.simantics.modeling.tests.commands;
3 import org.simantics.db.testing.common.CommandInvoker;
4 import org.simantics.db.testing.common.CommandSequenceEnvironment;
5 import org.simantics.modeling.tests.traits.SingleResourceTrait;
7 public class OpenAndCloseDiagram implements CommandInvoker<SingleResourceTrait> {
10 public void invoke(CommandSequenceEnvironment environment, SingleResourceTrait parameter) throws Exception {
12 LoadDiagram load = new LoadDiagram(parameter.getResource());
13 UnloadDiagram unload = new UnloadDiagram(load);
14 environment.invoke(environment, load);
15 environment.invoke(environment, unload);
16 environment.invoke(environment, new CollectMemory());