]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/CommandListImpl.java
Added missing org.simantics.db.{tests,testing} plug-ins.
[simantics/platform.git] / bundles / org.simantics.db.testing / src / org / simantics / db / testing / base / CommandListImpl.java
diff --git a/bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/CommandListImpl.java b/bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/CommandListImpl.java
new file mode 100644 (file)
index 0000000..d246339
--- /dev/null
@@ -0,0 +1,21 @@
+package org.simantics.db.testing.base;
+
+import java.util.ArrayList;
+
+import org.simantics.db.testing.common.Command;
+
+public class CommandListImpl implements CommandList {
+       
+       public ArrayList<Command> commands = new ArrayList<Command>();
+
+       @Override
+       public <T extends Command> T add(T command) {
+               commands.add(command);
+               return command;
+       }
+       
+       public Command[] toArray() {
+               return commands.toArray(new Command[commands.size()]);
+       }
+       
+}