Add a setter for unit tests

This commit is contained in:
James Agnew 2019-08-29 21:43:29 -04:00
parent dbe86c8669
commit 347aada62e
1 changed files with 9 additions and 3 deletions

View File

@ -44,13 +44,19 @@ import java.util.TreeSet;
public class BaseJpaProvider { public class BaseJpaProvider {
public static final String REMOTE_ADDR = "req.remoteAddr"; public static final String REMOTE_ADDR = "req.remoteAddr";
public static final String REMOTE_UA = "req.userAgent"; public static final String REMOTE_UA = "req.userAgent";
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseJpaProvider.class);
@Autowired @Autowired
protected DaoConfig myDaoConfig; protected DaoConfig myDaoConfig;
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseJpaProvider.class);
private FhirContext myContext; private FhirContext myContext;
public BaseJpaProvider() {
super();
}
public void setDaoConfigForUnitTest(DaoConfig theDaoConfig) {
myDaoConfig = theDaoConfig;
}
protected ExpungeOptions createExpungeOptions(IPrimitiveType<? extends Integer> theLimit, IPrimitiveType<? extends Boolean> theExpungeDeletedResources, IPrimitiveType<? extends Boolean> theExpungeOldVersions, IPrimitiveType<? extends Boolean> theExpungeEverything) { protected ExpungeOptions createExpungeOptions(IPrimitiveType<? extends Integer> theLimit, IPrimitiveType<? extends Boolean> theExpungeDeletedResources, IPrimitiveType<? extends Boolean> theExpungeOldVersions, IPrimitiveType<? extends Boolean> theExpungeEverything) {
ExpungeOptions options = new ExpungeOptions(); ExpungeOptions options = new ExpungeOptions();
if (theLimit != null && theLimit.getValue() != null) { if (theLimit != null && theLimit.getValue() != null) {