@Test public void testExecuteTransaction_WithVariousSecurityGroups_ExpectsCorrectTaskGraph() throws Exception { this.factoryTask.createPortGroupTask = new CreatePortGroupTask(); this.factoryTask.updatePortGroupTask = new UpdatePortGroupTask(); this.factoryTask.deletePortGroupTask = new DeletePortGroupTask(); PortGroupCheckMetaTask task = this.factoryTask.create(this.sg, this.isDeleteTg, this.domainId); task.execute(); TaskGraphHelper.validateTaskGraph(task, this.expectedGraph); }
public PortGroupCheckMetaTask create(SecurityGroup sg, boolean deleteTg, String domainId) { PortGroupCheckMetaTask task = new PortGroupCheckMetaTask(); task.createPortGroupTask = this.createPortGroupTask; task.updatePortGroupTask = this.updatePortGroupTask; task.deletePortGroupTask = this.deletePortGroupTask; task.securityGroup = sg; task.deleteTg = deleteTg; task.domainId = domainId; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
PortGroupCheckMetaTask extends TransactionalMetaTask { public PortGroupCheckMetaTask create(SecurityGroup sg, boolean deleteTg, String domainId) { PortGroupCheckMetaTask task = new PortGroupCheckMetaTask(); task.createPortGroupTask = this.createPortGroupTask; task.updatePortGroupTask = this.updatePortGroupTask; task.deletePortGroupTask = this.deletePortGroupTask; task.securityGroup = sg; task.deleteTg = deleteTg; task.domainId = domainId; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
PortGroupCheckMetaTask extends TransactionalMetaTask { public PortGroupCheckMetaTask create(SecurityGroup sg, boolean deleteTg, String domainId) { PortGroupCheckMetaTask task = new PortGroupCheckMetaTask(); task.createPortGroupTask = this.createPortGroupTask; task.updatePortGroupTask = this.updatePortGroupTask; task.deletePortGroupTask = this.deletePortGroupTask; task.securityGroup = sg; task.deleteTg = deleteTg; task.domainId = domainId; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
PortGroupCheckMetaTask extends TransactionalMetaTask { public PortGroupCheckMetaTask create(SecurityGroup sg, boolean deleteTg, String domainId) { PortGroupCheckMetaTask task = new PortGroupCheckMetaTask(); task.createPortGroupTask = this.createPortGroupTask; task.updatePortGroupTask = this.updatePortGroupTask; task.deletePortGroupTask = this.deletePortGroupTask; task.securityGroup = sg; task.deleteTg = deleteTg; task.domainId = domainId; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  PortGroupCheckMetaTask create(SecurityGroup sg, boolean deleteTg, String domainId); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects(); @Override TaskGraph getTaskGraph(); }
PortGroupCheckMetaTask extends TransactionalMetaTask { public PortGroupCheckMetaTask create(SecurityGroup sg, boolean deleteTg, String domainId) { PortGroupCheckMetaTask task = new PortGroupCheckMetaTask(); task.createPortGroupTask = this.createPortGroupTask; task.updatePortGroupTask = this.updatePortGroupTask; task.deletePortGroupTask = this.deletePortGroupTask; task.securityGroup = sg; task.deleteTg = deleteTg; task.domainId = domainId; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  PortGroupCheckMetaTask create(SecurityGroup sg, boolean deleteTg, String domainId); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects(); @Override TaskGraph getTaskGraph();  }