@Test public void testExecute_WithVariousSecurityGroups_ExpectsCorrectTaskGraph() throws Exception { this.factoryTask.createMgrSecurityGroupTask = new CreateMgrSecurityGroupTask(); this.factoryTask.updateMgrSecurityGroupTask = new UpdateMgrSecurityGroupTask(); this.factoryTask.deleteMgrSecurityGroupTask = new DeleteMgrSecurityGroupTask(); MgrSecurityGroupCheckMetaTask task = this.factoryTask.create(this.vs, this.sg); task.execute(); TaskGraphHelper.validateTaskGraph(task, this.expectedGraph); }
public MgrSecurityGroupCheckMetaTask create(VirtualSystem vs) { MgrSecurityGroupCheckMetaTask task = new MgrSecurityGroupCheckMetaTask(); task.vs = vs; task.name = task.getName(); task.createMgrSecurityGroupTask = this.createMgrSecurityGroupTask; task.updateMgrSecurityGroupTask = this.updateMgrSecurityGroupTask; task.deleteMgrSecurityGroupTask = this.deleteMgrSecurityGroupTask; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
MgrSecurityGroupCheckMetaTask extends TransactionalMetaTask { public MgrSecurityGroupCheckMetaTask create(VirtualSystem vs) { MgrSecurityGroupCheckMetaTask task = new MgrSecurityGroupCheckMetaTask(); task.vs = vs; task.name = task.getName(); task.createMgrSecurityGroupTask = this.createMgrSecurityGroupTask; task.updateMgrSecurityGroupTask = this.updateMgrSecurityGroupTask; task.deleteMgrSecurityGroupTask = this.deleteMgrSecurityGroupTask; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
MgrSecurityGroupCheckMetaTask extends TransactionalMetaTask { public MgrSecurityGroupCheckMetaTask create(VirtualSystem vs) { MgrSecurityGroupCheckMetaTask task = new MgrSecurityGroupCheckMetaTask(); task.vs = vs; task.name = task.getName(); task.createMgrSecurityGroupTask = this.createMgrSecurityGroupTask; task.updateMgrSecurityGroupTask = this.updateMgrSecurityGroupTask; task.deleteMgrSecurityGroupTask = this.deleteMgrSecurityGroupTask; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
MgrSecurityGroupCheckMetaTask extends TransactionalMetaTask { public MgrSecurityGroupCheckMetaTask create(VirtualSystem vs) { MgrSecurityGroupCheckMetaTask task = new MgrSecurityGroupCheckMetaTask(); task.vs = vs; task.name = task.getName(); task.createMgrSecurityGroupTask = this.createMgrSecurityGroupTask; task.updateMgrSecurityGroupTask = this.updateMgrSecurityGroupTask; task.deleteMgrSecurityGroupTask = this.deleteMgrSecurityGroupTask; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  MgrSecurityGroupCheckMetaTask create(VirtualSystem vs); MgrSecurityGroupCheckMetaTask create(VirtualSystem vs, SecurityGroup sg); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override TaskGraph getTaskGraph(); @Override Set<LockObjectReference> getObjects(); }
MgrSecurityGroupCheckMetaTask extends TransactionalMetaTask { public MgrSecurityGroupCheckMetaTask create(VirtualSystem vs) { MgrSecurityGroupCheckMetaTask task = new MgrSecurityGroupCheckMetaTask(); task.vs = vs; task.name = task.getName(); task.createMgrSecurityGroupTask = this.createMgrSecurityGroupTask; task.updateMgrSecurityGroupTask = this.updateMgrSecurityGroupTask; task.deleteMgrSecurityGroupTask = this.deleteMgrSecurityGroupTask; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  MgrSecurityGroupCheckMetaTask create(VirtualSystem vs); MgrSecurityGroupCheckMetaTask create(VirtualSystem vs, SecurityGroup sg); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override TaskGraph getTaskGraph(); @Override Set<LockObjectReference> getObjects();  }