You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by mi...@apache.org on 2010/02/08 23:49:33 UTC
svn commit: r907835 - in
/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache:
TestCacheExclusions.java TestCacheExclusionsLower.java
TestCacheExclusionsUpper.java
Author: mikedd
Date: Mon Feb 8 22:49:33 2010
New Revision: 907835
URL: http://svn.apache.org/viewvc?rev=907835&view=rev
Log:
OPENJPA-1500:
Modify testcase to run twice with lower and uppercase values for included and excluded types.
Added:
openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsLower.java (with props)
openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsUpper.java (with props)
Modified:
openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java
Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java?rev=907835&r1=907834&r2=907835&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java (original)
+++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java Mon Feb 8 22:49:33 2010
@@ -30,7 +30,7 @@
import org.apache.openjpa.persistence.StoreCache;
import org.apache.openjpa.persistence.test.PersistenceTestCase;
-public class TestCacheExclusions extends PersistenceTestCase {
+public abstract class TestCacheExclusions extends PersistenceTestCase {
private OpenJPAEntityManagerFactorySPI emf = null;
@@ -174,7 +174,8 @@
Class<?>[] includedTypes, Class<?>[] excludedTypes) {
StringBuilder includes = new StringBuilder();
if (includedTypes != null && includedTypes.length > 0) {
- includes.append("Types=");
+ includes.append(getTypesIndicator());
+ includes.append("=");
for (Class<?> c : includedTypes) {
includes.append(c.getName());
includes.append(_tSep);
@@ -183,7 +184,8 @@
}
StringBuilder excludes = new StringBuilder();
if (excludedTypes != null && excludedTypes.length > 0) {
- excludes.append("ExcludedTypes=");
+ excludes.append(getExcludedTypesIndicator());
+ excludes.append("=");
for (Class<?> c : excludedTypes) {
excludes.append(c.getName());
excludes.append(_tSep);
@@ -230,4 +232,7 @@
items[i].getId()));
}
}
+
+ abstract String getTypesIndicator();
+ abstract String getExcludedTypesIndicator();
}
Added: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsLower.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsLower.java?rev=907835&view=auto
==============================================================================
--- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsLower.java (added)
+++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsLower.java Mon Feb 8 22:49:33 2010
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.datacache;
+
+/**
+ * Run the cache exclusions tests lower upper case properties (types and excludedTypes)
+ */
+public class TestCacheExclusionsLower extends TestCacheExclusions {
+
+ @Override
+ String getExcludedTypesIndicator() {
+ return "excludedTypes";
+ }
+
+ @Override
+ String getTypesIndicator() {
+ return "types";
+ }
+}
Propchange: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsLower.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsUpper.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsUpper.java?rev=907835&view=auto
==============================================================================
--- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsUpper.java (added)
+++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsUpper.java Mon Feb 8 22:49:33 2010
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.datacache;
+
+/**
+ * Run the cache exclusions tests using upper case properties (Types and ExcludedTypes)
+ */
+public class TestCacheExclusionsUpper extends TestCacheExclusions {
+
+ @Override
+ String getExcludedTypesIndicator() {
+ return "ExcludedTypes";
+ }
+
+ @Override
+ String getTypesIndicator() {
+ return "Types";
+ }
+}
Propchange: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsUpper.java
------------------------------------------------------------------------------
svn:eol-style = native