Improve updated JUnit test.
This commit is contained in:
parent
4bf649c09c
commit
97e6d967e9
|
@ -6,6 +6,7 @@ import ca.uhn.fhir.jpa.model.entity.BinaryStorageEntity;
|
|||
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
|
||||
import org.hl7.fhir.r4.model.IdType;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
@ -37,11 +38,18 @@ public class DatabaseBlobBinaryStorageSvcImplTest extends BaseJpaR4Test {
|
|||
@Autowired
|
||||
private DaoConfig myDaoConfig;
|
||||
|
||||
@After
|
||||
public void resetDaoConfig() {
|
||||
myDaoConfig.setPreloadBlobFromInputStream(false);
|
||||
@Before
|
||||
public void backupDaoConfig() {
|
||||
defaultPreloadBlobFromInputStream = myDaoConfig.isPreloadBlobFromInputStream();
|
||||
}
|
||||
|
||||
@After
|
||||
public void restoreDaoConfig() {
|
||||
myDaoConfig.setPreloadBlobFromInputStream(defaultPreloadBlobFromInputStream);
|
||||
}
|
||||
|
||||
boolean defaultPreloadBlobFromInputStream;
|
||||
|
||||
@Test
|
||||
public void testStoreAndRetrieve() throws IOException {
|
||||
|
||||
|
|
Loading…
Reference in New Issue