@Test public void testExecute_WhenDeleteNetworkElementFails_ThrowsUnhandledException() throws Exception { DeleteServiceFunctionChainTask deleteTask = this.task.create(SG_SFC_FAIL_ELEMENT_EXISTS); mockDeleteNetworkElement(SG_SFC_FAIL_ELEMENT_EXISTS, new NetworkElementImpl(SG_SFC_FAIL_ELEMENT_EXISTS.getNetworkElementId()), new IllegalStateException()); this.exception.expect(IllegalStateException.class); deleteTask.execute(); assertEquals( SecurityGroupEntityMgr.findById(this.em, SG_SFC_FAIL_ELEMENT_EXISTS.getId()).getNetworkElementId(), SG_SFC_FAIL_ELEMENT_EXISTS.getNetworkElementId()); }
public DeleteServiceFunctionChainTask create(SecurityGroup securityGroup) { DeleteServiceFunctionChainTask task = new DeleteServiceFunctionChainTask(); task.securityGroup = securityGroup; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
DeleteServiceFunctionChainTask extends TransactionalTask { public DeleteServiceFunctionChainTask create(SecurityGroup securityGroup) { DeleteServiceFunctionChainTask task = new DeleteServiceFunctionChainTask(); task.securityGroup = securityGroup; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
DeleteServiceFunctionChainTask extends TransactionalTask { public DeleteServiceFunctionChainTask create(SecurityGroup securityGroup) { DeleteServiceFunctionChainTask task = new DeleteServiceFunctionChainTask(); task.securityGroup = securityGroup; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
DeleteServiceFunctionChainTask extends TransactionalTask { public DeleteServiceFunctionChainTask create(SecurityGroup securityGroup) { DeleteServiceFunctionChainTask task = new DeleteServiceFunctionChainTask(); task.securityGroup = securityGroup; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  DeleteServiceFunctionChainTask create(SecurityGroup securityGroup); @Override void executeTransaction(EntityManager em); @Override Set<LockObjectReference> getObjects(); @Override String getName(); }
DeleteServiceFunctionChainTask extends TransactionalTask { public DeleteServiceFunctionChainTask create(SecurityGroup securityGroup) { DeleteServiceFunctionChainTask task = new DeleteServiceFunctionChainTask(); task.securityGroup = securityGroup; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  DeleteServiceFunctionChainTask create(SecurityGroup securityGroup); @Override void executeTransaction(EntityManager em); @Override Set<LockObjectReference> getObjects(); @Override String getName();  }