diff options
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/general/GeneralPropertiesAdapterTests.java')
-rw-r--r-- | jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/general/GeneralPropertiesAdapterTests.java | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/general/GeneralPropertiesAdapterTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/general/GeneralPropertiesAdapterTests.java deleted file mode 100644 index 7d8f4f5bd3..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/general/GeneralPropertiesAdapterTests.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2009 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.jpa.eclipselink.core.tests.internal.context.persistence.general; - -import org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener; -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties; -import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.general.GeneralProperties; -import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.persistence.EclipseLinkPersistenceUnitTestCase; - -/** - * GeneralAdapterTests - */ -@SuppressWarnings("nls") -public class GeneralPropertiesAdapterTests extends EclipseLinkPersistenceUnitTestCase -{ - private GeneralProperties generalProperties; - - public static final String EXCLUDE_ECLIPSELINK_ORM_KEY = GeneralProperties.ECLIPSELINK_EXCLUDE_ECLIPSELINK_ORM; - public static final Boolean EXCLUDE_ECLIPSELINK_ORM_TEST_VALUE = false; - public static final Boolean EXCLUDE_ECLIPSELINK_ORM_TEST_VALUE_2 = ! EXCLUDE_ECLIPSELINK_ORM_TEST_VALUE; - - - public GeneralPropertiesAdapterTests(String name) { - super(name); - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - this.generalProperties = this.subject.getGeneralProperties(); - PropertyChangeListener propertyChangeListener = this.buildPropertyChangeListener(); - - this.generalProperties.addPropertyChangeListener(GeneralProperties.EXCLUDE_ECLIPSELINK_ORM_PROPERTY, propertyChangeListener); - - this.clearEvent(); - } - - /** - * Initializes directly the PU properties before testing. - */ - @Override - protected void populatePu() { - this.modelPropertiesSizeOriginal = 1; - this.propertiesTotal = this.modelPropertiesSizeOriginal + 2; // misc properties - this.modelPropertiesSize = this.modelPropertiesSizeOriginal; - - this.persistenceUnitSetProperty("misc.property.1", "value.1"); - this.persistenceUnitSetProperty(EXCLUDE_ECLIPSELINK_ORM_KEY, EXCLUDE_ECLIPSELINK_ORM_TEST_VALUE.toString()); - this.persistenceUnitSetProperty("misc.property.2", "value.2"); - - return; - } - - - // ********** ExcludeEclipselinkOrm tests ********** - public void testSetExcludeEclipselinkOrm() throws Exception { - this.verifyModelInitialized( - EXCLUDE_ECLIPSELINK_ORM_KEY, - EXCLUDE_ECLIPSELINK_ORM_TEST_VALUE); - this.verifySetProperty( - EXCLUDE_ECLIPSELINK_ORM_KEY, - EXCLUDE_ECLIPSELINK_ORM_TEST_VALUE, - EXCLUDE_ECLIPSELINK_ORM_TEST_VALUE_2); - } - - public void testAddRemoveExcludeEclipselinkOrm() throws Exception { - this.verifyAddRemoveProperty( - EXCLUDE_ECLIPSELINK_ORM_KEY, - EXCLUDE_ECLIPSELINK_ORM_TEST_VALUE, - EXCLUDE_ECLIPSELINK_ORM_TEST_VALUE_2); - } - - - - // ********** get/set property ********** - @Override - protected Object getProperty(String propertyName) throws NoSuchFieldException { - Object modelValue = null; - if (propertyName.equals(GeneralProperties.EXCLUDE_ECLIPSELINK_ORM_PROPERTY)) - modelValue = this.generalProperties.getExcludeEclipselinkOrm(); - else - this.throwMissingDefinition("getProperty", propertyName); - return modelValue; - } - - @Override - protected void setProperty(String propertyName, Object newValue) throws Exception { - if (propertyName.equals(GeneralProperties.EXCLUDE_ECLIPSELINK_ORM_PROPERTY)) - this.generalProperties.setExcludeEclipselinkOrm((Boolean) newValue); - else - this.throwMissingDefinition("setProperty", propertyName); - } - - @Override - protected PersistenceUnitProperties getModel() { - return this.generalProperties; - } -} |