use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.
the class Query_SpatialExpOp_ExpGeom_Tests method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.setName("Query_SpatialExpOp_ExpGeom_Tests");
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDORelateRectangle"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDORelateCircle"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDORelateArbitraryLine"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOFilterRectangle"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOFilterRectangleNullParams"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOFilterCircle"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOFilterArbitraryLine"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOWithinDistanceRectangle"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOWithinDistanceRectangleUsingMaxResolution"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOWithinDistanceCircle"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOWithinDistanceArbitraryLine"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOWithinDistanceNullParamsMatchingCircle1004"));
suite.addTest(new Query_SpatialExpOp_ExpGeom_Tests("testSDOWithinDistanceNullParamsNotMatching"));
return new TestSetup(suite) {
protected void setUp() {
try {
WrappedSpatialTestCase.repopulate(getSession(), true);
} catch (Exception e) {
throw new TestProblemException("Could not setup JGeometry test model. Note: This model requires you to run the following CREATE OR REPLACE TYPE MY_GEOMETRY AS OBJECT (id NUMBER, geom MDSYS.SDO_GEOMETRY): ", e);
}
}
protected void tearDown() {
}
};
}
use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.
the class SpatialJPQLTestSuite method populate.
protected void populate() {
SampleGeometries samples = new SampleGeometries();
EntityManager em = createEntityManager(STRUCT_CONVERTER_PU);
beginTransaction(em);
try {
List<SimpleSpatial> simpleSpatials = samples.simpleJpaPopulation();
for (SimpleSpatial ss : simpleSpatials) {
em.persist(ss);
}
commitTransaction(em);
assertEquals(simpleSpatials.size(), ((Long) em.createQuery("SELECT COUNT(ss) FROM SimpleSpatial ss").getSingleResult()).intValue());
} catch (Exception ex) {
if (isTransactionActive(em)) {
rollbackTransaction(em);
}
throw new TestProblemException("Populate failed", ex);
} finally {
closeEntityManager(em);
clearCache(STRUCT_CONVERTER_PU);
}
}
use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.
the class DeleteTests method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.setName("DeleteTests");
suite.addTest(new DeleteTests("testAnySingleDelete"));
return new TestSetup(suite) {
protected void setUp() {
try {
SimpleSpatialTestCase.repopulate(getSession(), true);
} catch (Exception e) {
throw new TestProblemException("Could not setup JGeometry test model", e);
}
}
protected void tearDown() {
}
};
}
use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.
the class Query_Basic_Tests method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.setName("Query_Basic_Tests");
suite.addTest(new Query_Basic_Tests("testReadAll"));
suite.addTest(new Query_Basic_Tests("testReadNotNullGeometry"));
suite.addTest(new Query_Basic_Tests("testRawUsage"));
return new TestSetup(suite) {
protected void setUp() {
try {
SimpleSpatialTestCase.repopulate(getSession(), true);
} catch (Exception e) {
throw new TestProblemException("Could not setup JGeometry test model", e);
}
}
protected void tearDown() {
}
};
}
use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.
the class Query_OrderedHint method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.setName("Query_OrderedHint");
suite.addTest(new Query_OrderedHint("testReadAll"));
return new TestSetup(suite) {
protected void setUp() {
try {
SimpleSpatialTestCase.repopulate(getSession(), true);
} catch (Exception e) {
throw new TestProblemException("Could not setup JGeometry test model", e);
}
}
protected void tearDown() {
}
};
}
Aggregations