@Test public void testExecute_WhenDomainFound_DeletionIsSuccesfull() throws Exception { DistributedApplianceInstance dai = registerNewDAI(1L); String domainId = UUID.randomUUID().toString(); registerDomain(domainId, dai); SdnRedirectionApi redirectionApi = mockRemoveInspectionPort(dai, domainId, null); registerNetworkRedirectionApi(redirectionApi, dai); DeleteInspectionPortTask task = this.factory.create("region", dai); task.execute(); verify(redirectionApi, times(1)).removeInspectionPort(argThat(new InspectionPortMatcher(dai, domainId))); }
public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
DeleteInspectionPortTask extends TransactionalTask { public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
DeleteInspectionPortTask extends TransactionalTask { public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
DeleteInspectionPortTask extends TransactionalTask { public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects(); }
DeleteInspectionPortTask extends TransactionalTask { public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects();  }