Fix broken test

This commit is contained in:
James Agnew 2019-04-02 10:00:56 -04:00
parent 90d163a4e9
commit 588082aee2
2 changed files with 10 additions and 1 deletions

View File

@ -458,10 +458,15 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc {
}
@VisibleForTesting
public void setDaoRegistryForUnitTest(DaoRegistry theDaoRegistry) {
void setDaoRegistryForUnitTest(DaoRegistry theDaoRegistry) {
myDaoRegistry = theDaoRegistry;
}
@VisibleForTesting
void setInterceptorBroadcasterForUnitTest(IInterceptorBroadcaster theInterceptorBroadcaster) {
myInterceptorBroadcaster = theInterceptorBroadcaster;
}
public abstract class BaseTask implements Callable<Void> {
private final SearchParameterMap myParams;
private final IDao myCallingDao;

View File

@ -7,6 +7,7 @@ import ca.uhn.fhir.jpa.dao.data.ISearchIncludeDao;
import ca.uhn.fhir.jpa.dao.data.ISearchResultDao;
import ca.uhn.fhir.jpa.entity.Search;
import ca.uhn.fhir.jpa.entity.SearchResult;
import ca.uhn.fhir.jpa.model.interceptor.api.IInterceptorBroadcaster;
import ca.uhn.fhir.jpa.model.search.SearchStatusEnum;
import ca.uhn.fhir.jpa.entity.SearchTypeEnum;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
@ -76,6 +77,8 @@ public class SearchCoordinatorSvcImplTest {
private Search myCurrentSearch;
@Mock
private DaoRegistry myDaoRegistry;
@Mock
private IInterceptorBroadcaster myInterceptorBroadcaster;
@After
public void after() {
@ -94,6 +97,7 @@ public class SearchCoordinatorSvcImplTest {
mySvc.setSearchDaoIncludeForUnitTest(mySearchIncludeDao);
mySvc.setSearchDaoResultForUnitTest(mySearchResultDao);
mySvc.setDaoRegistryForUnitTest(myDaoRegistry);
mySvc.setInterceptorBroadcasterForUnitTest(myInterceptorBroadcaster);
myDaoConfig = new DaoConfig();
mySvc.setDaoConfigForUnitTest(myDaoConfig);