Search in sources :

Example 1 with TestProblemException

use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.

the class Query_SpatialOp_ExpReport_Tests method suite.

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.setName("Query_SpatialOp_ExpReport_Tests");
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDORelateRectangle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDORelateCircle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDORelateArbitraryLine"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOFilterRectangle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOFilterRectangleNullParams"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOFilterCircle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOFilterArbitraryLine"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceRectangle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceRectangleUsingMaxResolution"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceCircle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceArbitraryLine"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceNullParamsMatchingCircle1004"));
    suite.addTest(new Query_SpatialOp_ExpReport_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() {
        }
    };
}
Also used : TestSetup(junit.extensions.TestSetup) TestSuite(junit.framework.TestSuite) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException)

Example 2 with TestProblemException

use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.

the class UpdateTests method suite.

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.setName("UpdateTests");
    suite.addTest(new UpdateTests("testUpdateSingleToNull"));
    suite.addTest(new UpdateTests("testUpdateAllToNull"));
    suite.addTest(new UpdateTests("testReplaceExisting"));
    return new TestSetup(suite) {

        private boolean shouldBindAllParameters;

        @Override
        protected void setUp() {
            try {
                shouldBindAllParameters = getSession().getLogin().getShouldBindAllParameters();
                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);
            }
        }

        @Override
        protected void tearDown() {
            try {
                getSession().getLogin().setShouldBindAllParameters(shouldBindAllParameters);
            } catch (Exception e) {
                throw new TestProblemException("Could not clean up JGeometry test model", e);
            }
        }
    };
}
Also used : TestSetup(junit.extensions.TestSetup) TestSuite(junit.framework.TestSuite) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException)

Example 3 with TestProblemException

use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.

the class Query_SpatialOp_ExpExp_Tests method suite.

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.setName("Query_SpatialOp_ExpExp_Tests");
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDORelateRectangle"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDORelateCircle"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDORelateArbitraryLine"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDOFilterRectangle"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDOFilterRectangleNullParams"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDOFilterCircle"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDOFilterArbitraryLine"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDOWithinDistanceRectangle"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDOWithinDistanceRectangleUsingMaxResolution"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDOWithinDistanceCircle"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDOWithinDistanceArbitraryLine"));
    suite.addTest(new Query_SpatialOp_ExpExp_Tests("testSDOWithinDistanceNullParamsMatchingCircle1004"));
    suite.addTest(new Query_SpatialOp_ExpExp_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() {
        }
    };
}
Also used : TestSetup(junit.extensions.TestSetup) TestSuite(junit.framework.TestSuite) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException)

Example 4 with TestProblemException

use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.

the class Query_SpatialOp_ExpReport_Tests method suite.

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.setName("Query_SpatialOp_ExpReport_Tests");
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDORelateRectangle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDORelateCircle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDORelateArbitraryLine"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOFilterRectangle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOFilterRectangleNullParams"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOFilterCircle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOFilterArbitraryLine"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceRectangle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceRectangleUsingMaxResolution"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceCircle"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceArbitraryLine"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceNullParamsMatchingCircle1004"));
    suite.addTest(new Query_SpatialOp_ExpReport_Tests("testSDOWithinDistanceNullParamsNotMatching"));
    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() {
        }
    };
}
Also used : TestSetup(junit.extensions.TestSetup) TestSuite(junit.framework.TestSuite) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException)

Example 5 with TestProblemException

use of org.eclipse.persistence.testing.framework.TestProblemException in project eclipselink by eclipse-ee4j.

the class CreateTests method suite.

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.setName("CreateTests");
    suite.addTest(new CreateTests("testCreate_SRID_0_WithoutBinding"));
    suite.addTest(new CreateTests("testCreate_SRID_0_WithBinding"));
    suite.addTest(new CreateTests("testInsertNullWithBinding"));
    suite.addTest(new CreateTests("testInsertNullWithoutBinding"));
    return new TestSetup(suite) {

        private boolean shouldBindAllParameters;

        protected void setUp() {
            try {
                shouldBindAllParameters = getSession().getLogin().getShouldBindAllParameters();
                SimpleSpatialTestCase.repopulate(getSession(), true);
            } catch (Exception e) {
                throw new TestProblemException("Could not setup JGeometry test model", e);
            }
        }

        protected void tearDown() {
            try {
                getSession().getLogin().setShouldBindAllParameters(shouldBindAllParameters);
            } catch (Exception e) {
                throw new TestProblemException("Could not clean up JGeometry test model", e);
            }
        }
    };
}
Also used : TestSetup(junit.extensions.TestSetup) TestSuite(junit.framework.TestSuite) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException) TestProblemException(org.eclipse.persistence.testing.framework.TestProblemException)

Aggregations

TestProblemException (org.eclipse.persistence.testing.framework.TestProblemException)48 TestSetup (junit.extensions.TestSetup)18 TestSuite (junit.framework.TestSuite)18 PersistenceProvider (jakarta.persistence.spi.PersistenceProvider)7 HashMap (java.util.HashMap)7 Map (java.util.Map)7 SQLException (java.sql.SQLException)4 Vector (java.util.Vector)3 NamingException (javax.naming.NamingException)3 ExpressionBuilder (org.eclipse.persistence.expressions.ExpressionBuilder)3 DatabaseAccessor (org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor)3 DatabaseSession (org.eclipse.persistence.sessions.DatabaseSession)3 TestErrorException (org.eclipse.persistence.testing.framework.TestErrorException)3 TestWarningException (org.eclipse.persistence.testing.framework.TestWarningException)3 RMISecurityManager (java.rmi.RMISecurityManager)2 RemoteException (java.rmi.RemoteException)2 Connection (java.sql.Connection)2 Statement (java.sql.Statement)2 DatabaseException (org.eclipse.persistence.exceptions.DatabaseException)2 Expression (org.eclipse.persistence.expressions.Expression)2