Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmContextModelTestCase.java')
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmContextModelTestCase.java78
1 files changed, 0 insertions, 78 deletions
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmContextModelTestCase.java
deleted file mode 100644
index dd05f40c07..0000000000
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmContextModelTestCase.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle.
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.eclipselink.core.tests.internal.context.orm;
-
-import org.eclipse.jpt.core.context.MappingFile;
-import org.eclipse.jpt.core.internal.operations.OrmFileCreationDataModelProperties;
-import org.eclipse.jpt.core.tests.internal.projects.TestJpaProject;
-import org.eclipse.jpt.eclipselink.core.internal.context.orm.EclipseLinkEntityMappings;
-import org.eclipse.jpt.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
-import org.eclipse.jpt.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationOperation;
-import org.eclipse.jpt.eclipselink.core.internal.resource.orm.EclipseLinkOrmResourceModelProvider;
-import org.eclipse.jpt.eclipselink.core.resource.orm.EclipseLinkOrmResource;
-import org.eclipse.jpt.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public abstract class EclipseLinkOrmContextModelTestCase
- extends EclipseLinkContextModelTestCase
-{
- protected EclipseLinkOrmResourceModelProvider eclipseLinkOrmResourceModelProvider;
-
-
- protected EclipseLinkOrmContextModelTestCase(String name) {
- super(name);
- }
-
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- this.eclipseLinkOrmResourceModelProvider =
- EclipseLinkOrmResourceModelProvider.getDefaultModelProvider(getJavaProject().getProject());
- }
-
- @Override
- protected TestJpaProject buildJpaProject(String projectName, boolean autoBuild, IDataModel jpaConfig) throws Exception {
- TestJpaProject testJpaProject = super.buildJpaProject(projectName, autoBuild, jpaConfig);
-
- EclipseLinkOrmFileCreationOperation operation =
- new EclipseLinkOrmFileCreationOperation(buildEclipseLinkOrmConfig(testJpaProject));
- operation.execute(null, null);
-
- return testJpaProject;
- }
-
- protected IDataModel buildEclipseLinkOrmConfig(TestJpaProject testJpaProject) {
- IDataModel dataModel =
- DataModelFactory.createDataModel(new EclipseLinkOrmFileCreationDataModelProvider());
- dataModel.setProperty(OrmFileCreationDataModelProperties.PROJECT_NAME, testJpaProject.getProject().getName());
- dataModel.setProperty(OrmFileCreationDataModelProperties.ADD_TO_PERSISTENCE_UNIT, Boolean.TRUE);
- return dataModel;
- }
-
- @Override
- protected void tearDown() throws Exception {
- this.eclipseLinkOrmResourceModelProvider = null;
- super.tearDown();
- }
-
- @Override
- protected EclipseLinkOrmResource ormResource() {
- return this.eclipseLinkOrmResourceModelProvider.getResource();
- }
-
- @Override
- protected EclipseLinkEntityMappings entityMappings() {
- MappingFile mappingFile = persistenceUnit().mappingFileRefs().next().getMappingFile();
- return (mappingFile == null) ? null : (EclipseLinkEntityMappings) mappingFile.getRoot();
- }
-}

Back to the top