Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortle2010-01-07 17:42:00 +0000
committertle2010-01-07 17:42:00 +0000
commit00e4248cdda469f93c3bfa2403a7b1474b106821 (patch)
tree53f45a38f37e15ecbe30194642526b4689310d10 /jpa/tests/org.eclipse.jpt.eclipselink.core.tests
parent7cdc8dc5a24f53d7b14a44279d07a479181c42bc (diff)
downloadwebtools.dali-00e4248cdda469f93c3bfa2403a7b1474b106821.tar.gz
webtools.dali-00e4248cdda469f93c3bfa2403a7b1474b106821.tar.xz
webtools.dali-00e4248cdda469f93c3bfa2403a7b1474b106821.zip
298646 - Unable to unset eclipselink logging file in persistence.xml
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.eclipselink.core.tests')
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/logging/LoggingAdapterTests.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/logging/LoggingAdapterTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/logging/LoggingAdapterTests.java
index bf6e954fa3..405ca17d77 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/logging/LoggingAdapterTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/logging/LoggingAdapterTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2008, 2009 Oracle. All rights reserved.
+* Copyright (c) 2008, 2010 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.
@@ -204,6 +204,20 @@ public class LoggingAdapterTests extends EclipseLinkPersistenceUnitTestCase
LOG_FILE_LOCATION_TEST_VALUE,
LOG_FILE_LOCATION_TEST_VALUE_2);
}
+
+ public void testSetEmptyFileLocation() throws Exception {
+ String puKey = LOG_FILE_LOCATION_KEY;
+ PersistenceUnit.Property property = this.getPersistenceUnit().getProperty(puKey);
+ String propertyName = this.getModel().propertyIdOf(property);
+
+ // Set FileLocation to "" & verify that the property is deleted
+ this.verifyPuHasProperty(puKey, "persistenceUnit.properties doesn't contains: ");
+ this.setProperty(propertyName, "");
+
+ this.verifyPuHasNotProperty(puKey, "Property was not deleted");
+ this.verifyPutProperty(propertyName, null);
+ assertNull(this.getPersistenceUnit().getProperty(puKey));
+ }
// ********** Logger tests **********
public void testSetLogger() throws Exception {

Back to the top