Travis
This commit is contained in:
parent
6d0a7870b5
commit
7acacda758
|
@ -7,7 +7,7 @@ import org.junit.Test;
|
|||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.model.dstu2.resource.Condition;
|
||||
|
||||
public class BaseFhirDaoTest {
|
||||
public class BaseFhirDaoTest extends BaseJpaTest {
|
||||
|
||||
private static FhirContext ourCtx = FhirContext.forDstu2();
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package ca.uhn.fhir.jpa.dao;
|
||||
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLNonTransientConnectionException;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
|
||||
public class BaseJpaTest {
|
||||
|
||||
@AfterClass
|
||||
public static void afterClassShutdownDerby() throws SQLException {
|
||||
try {
|
||||
DriverManager.getConnection("jdbc:derby:memory:myUnitTestDB;drop=true");
|
||||
} catch (SQLNonTransientConnectionException e) {
|
||||
// expected.. for some reason....
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -25,7 +25,7 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
|
|||
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
|
||||
|
||||
public class FhirResourceDaoDstu1Test {
|
||||
public class FhirResourceDaoDstu1Test extends BaseJpaTest {
|
||||
|
||||
private static ClassPathXmlApplicationContext ourCtx;
|
||||
private static IFhirResourceDao<Device> ourDeviceDao;
|
||||
|
|
|
@ -93,7 +93,7 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
|
|||
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class FhirResourceDaoDstu2Test {
|
||||
public class FhirResourceDaoDstu2Test extends BaseJpaTest {
|
||||
|
||||
private static ClassPathXmlApplicationContext ourCtx;
|
||||
private static IFhirResourceDao<Device> ourDeviceDao;
|
||||
|
|
|
@ -45,7 +45,7 @@ import ca.uhn.fhir.rest.param.TokenParam;
|
|||
import ca.uhn.fhir.rest.server.IBundleProvider;
|
||||
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
|
||||
|
||||
public class FhirSystemDaoDstu1Test {
|
||||
public class FhirSystemDaoDstu1Test extends BaseJpaTest {
|
||||
|
||||
private static ClassPathXmlApplicationContext ourCtx;
|
||||
private static FhirContext ourFhirContext;
|
||||
|
|
|
@ -8,6 +8,8 @@ import static org.hamcrest.Matchers.startsWith;
|
|||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -45,7 +47,7 @@ import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException;
|
|||
import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
|
||||
|
||||
public class FhirSystemDaoDstu2Test {
|
||||
public class FhirSystemDaoDstu2Test extends BaseJpaTest {
|
||||
|
||||
private static ClassPathXmlApplicationContext ourCtx;
|
||||
private static FhirContext ourFhirContext;
|
||||
|
@ -953,7 +955,7 @@ public class FhirSystemDaoDstu2Test {
|
|||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterClass() {
|
||||
public static void afterClass() throws SQLException {
|
||||
ourCtx.close();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ import org.junit.Test;
|
|||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
|
||||
import ca.uhn.fhir.jpa.dao.DaoConfig;
|
||||
import ca.uhn.fhir.jpa.dao.IFhirResourceDao;
|
||||
import ca.uhn.fhir.jpa.testutil.RandomServerPortProvider;
|
||||
|
@ -49,7 +50,7 @@ import ca.uhn.fhir.rest.server.RestfulServer;
|
|||
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
|
||||
|
||||
public class ResourceProviderDstu1Test {
|
||||
public class ResourceProviderDstu1Test extends BaseJpaTest {
|
||||
|
||||
private static ClassPathXmlApplicationContext ourAppCtx;
|
||||
private static IGenericClient ourClient;
|
||||
|
|
|
@ -48,6 +48,7 @@ import org.junit.Test;
|
|||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
|
||||
import ca.uhn.fhir.jpa.dao.DaoConfig;
|
||||
import ca.uhn.fhir.jpa.dao.IFhirResourceDao;
|
||||
import ca.uhn.fhir.jpa.testutil.RandomServerPortProvider;
|
||||
|
@ -96,7 +97,7 @@ import ca.uhn.fhir.rest.server.RestfulServer;
|
|||
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
|
||||
|
||||
public class ResourceProviderDstu2Test {
|
||||
public class ResourceProviderDstu2Test extends BaseJpaTest {
|
||||
|
||||
private static ClassPathXmlApplicationContext ourAppCtx;
|
||||
private static IGenericClient ourClient;
|
||||
|
|
|
@ -13,6 +13,7 @@ import org.junit.Test;
|
|||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
|
||||
import ca.uhn.fhir.jpa.testutil.RandomServerPortProvider;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.dstu.resource.Patient;
|
||||
|
@ -26,7 +27,7 @@ import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
|
|||
import ca.uhn.fhir.rest.server.IResourceProvider;
|
||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||
|
||||
public class ResourceProviderMultiVersionTest {
|
||||
public class ResourceProviderMultiVersionTest extends BaseJpaTest {
|
||||
|
||||
private static ClassPathXmlApplicationContext ourAppCtx;
|
||||
private static IGenericClient ourClientDstu2;
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.junit.Test;
|
|||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
|
||||
import ca.uhn.fhir.jpa.dao.IFhirResourceDao;
|
||||
import ca.uhn.fhir.jpa.rp.dstu.ObservationResourceProvider;
|
||||
import ca.uhn.fhir.jpa.rp.dstu.OrganizationResourceProvider;
|
||||
|
@ -34,7 +35,7 @@ import ca.uhn.fhir.model.primitive.IdDt;
|
|||
import ca.uhn.fhir.rest.client.IGenericClient;
|
||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||
|
||||
public class SystemProviderDstu1Test {
|
||||
public class SystemProviderDstu1Test extends BaseJpaTest {
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SystemProviderDstu1Test.class);
|
||||
private static Server ourServer;
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.junit.Test;
|
|||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
|
||||
import ca.uhn.fhir.jpa.dao.IFhirResourceDao;
|
||||
import ca.uhn.fhir.jpa.rp.dstu.ObservationResourceProvider;
|
||||
import ca.uhn.fhir.jpa.rp.dstu.OrganizationResourceProvider;
|
||||
|
@ -29,7 +30,7 @@ import ca.uhn.fhir.model.primitive.IdDt;
|
|||
import ca.uhn.fhir.rest.client.IGenericClient;
|
||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||
|
||||
public class SystemProviderDstu2Test {
|
||||
public class SystemProviderDstu2Test extends BaseJpaTest {
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SystemProviderDstu2Test.class);
|
||||
private static Server ourServer;
|
||||
|
|
Loading…
Reference in New Issue