@Test public void testExecuteTransaction_WithVariousSecurityGroups_ExpectsCorrectTaskGraph() throws Exception { this.task.createServiceFunctionChainTask = new CreateServiceFunctionChainTask(); this.task.updateServiceFunctionChainTask = new UpdateServiceFunctionChainTask(); this.task.deleteServiceFunctionChainTask = new DeleteServiceFunctionChainTask(); CheckServiceFunctionChainMetaTask task = this.task.create(this.sg); task.execute(); TaskGraphHelper.validateTaskGraph(task, this.expectedGraph); }
public CheckServiceFunctionChainMetaTask create(SecurityGroup sg) { CheckServiceFunctionChainMetaTask task = new CheckServiceFunctionChainMetaTask(); task.createServiceFunctionChainTask = this.createServiceFunctionChainTask; task.updateServiceFunctionChainTask = this.updateServiceFunctionChainTask; task.deleteServiceFunctionChainTask = this.deleteServiceFunctionChainTask; task.securityGroup = sg; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
CheckServiceFunctionChainMetaTask extends TransactionalMetaTask { public CheckServiceFunctionChainMetaTask create(SecurityGroup sg) { CheckServiceFunctionChainMetaTask task = new CheckServiceFunctionChainMetaTask(); task.createServiceFunctionChainTask = this.createServiceFunctionChainTask; task.updateServiceFunctionChainTask = this.updateServiceFunctionChainTask; task.deleteServiceFunctionChainTask = this.deleteServiceFunctionChainTask; task.securityGroup = sg; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
CheckServiceFunctionChainMetaTask extends TransactionalMetaTask { public CheckServiceFunctionChainMetaTask create(SecurityGroup sg) { CheckServiceFunctionChainMetaTask task = new CheckServiceFunctionChainMetaTask(); task.createServiceFunctionChainTask = this.createServiceFunctionChainTask; task.updateServiceFunctionChainTask = this.updateServiceFunctionChainTask; task.deleteServiceFunctionChainTask = this.deleteServiceFunctionChainTask; task.securityGroup = sg; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
CheckServiceFunctionChainMetaTask extends TransactionalMetaTask { public CheckServiceFunctionChainMetaTask create(SecurityGroup sg) { CheckServiceFunctionChainMetaTask task = new CheckServiceFunctionChainMetaTask(); task.createServiceFunctionChainTask = this.createServiceFunctionChainTask; task.updateServiceFunctionChainTask = this.updateServiceFunctionChainTask; task.deleteServiceFunctionChainTask = this.deleteServiceFunctionChainTask; task.securityGroup = sg; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  CheckServiceFunctionChainMetaTask create(SecurityGroup sg); @Override void executeTransaction(EntityManager em); @Override Set<LockObjectReference> getObjects(); @Override TaskGraph getTaskGraph(); @Override String getName(); }
CheckServiceFunctionChainMetaTask extends TransactionalMetaTask { public CheckServiceFunctionChainMetaTask create(SecurityGroup sg) { CheckServiceFunctionChainMetaTask task = new CheckServiceFunctionChainMetaTask(); task.createServiceFunctionChainTask = this.createServiceFunctionChainTask; task.updateServiceFunctionChainTask = this.updateServiceFunctionChainTask; task.deleteServiceFunctionChainTask = this.deleteServiceFunctionChainTask; task.securityGroup = sg; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  CheckServiceFunctionChainMetaTask create(SecurityGroup sg); @Override void executeTransaction(EntityManager em); @Override Set<LockObjectReference> getObjects(); @Override TaskGraph getTaskGraph(); @Override String getName();  }