cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [10/16] cayenne git commit: CAY-2335: New XML loading/saving mechanics with support of plugable handlers - ProjectExtension - new upgrade handlers
Date Tue, 25 Jul 2017 12:25:25 GMT
http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V8Test.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V8Test.java b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V8Test.java
new file mode 100644
index 0000000..1201654
--- /dev/null
+++ b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V8Test.java
@@ -0,0 +1,97 @@
+/*****************************************************************
+ *   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.cayenne.project.upgrade.handlers;
+
+import org.apache.cayenne.configuration.DataChannelDescriptor;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.NodeList;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+
+/**
+ * @since 4.1
+ */
+public class UpgradeHandler_V8Test extends BaseUpgradeHandlerTest {
+
+    @Override
+    UpgradeHandler newHandler() {
+        return new UpgradeHandler_V8();
+    }
+
+    @Test
+    public void testProjectDomUpgrade() throws Exception {
+        Document document = processProjectDom("cayenne-project-v7.xml");
+
+        Element root = document.getDocumentElement();
+        assertEquals("8", root.getAttribute("project-version"));
+        assertEquals("", root.getAttribute("xmlns"));
+        assertEquals(2, root.getElementsByTagName("map").getLength());
+    }
+
+    @Test
+    public void testDataMapDomUpgrade() throws Exception {
+        Document document = processDataMapDom("test-map-v7.map.xml");
+
+        Element root = document.getDocumentElement();
+        assertEquals("8", root.getAttribute("project-version"));
+        assertEquals("http://cayenne.apache.org/schema/8/modelMap", root.getAttribute("xmlns"));
+        assertEquals(2, root.getElementsByTagName("db-attribute").getLength());
+
+        NodeList nodeList = root.getElementsByTagName("query");
+        for(int i=0; i<nodeList.getLength(); i++) {
+            NamedNodeMap attributes = nodeList.item(i).getAttributes();
+
+            // should change factory to type
+            assertNull(attributes.getNamedItem("factory"));
+
+            String type = attributes.getNamedItem("type").getNodeValue();
+            switch (attributes.getNamedItem("name").getNodeValue()) {
+                case "EjbqlQueryTest":
+                    assertEquals("EJBQLQuery", type);
+                    break;
+
+                case "SQLTemplateTest":
+                    assertEquals("SQLTemplate", type);
+                    break;
+
+                case "SelectQueryTest":
+                    assertEquals("SelectQuery", type);
+                    break;
+
+                case "ProcedureQueryTest":
+                    assertEquals("ProcedureQuery", type);
+                    break;
+            }
+        }
+    }
+
+    @Test
+    public void testModelUpgrade() throws Exception {
+        DataChannelDescriptor descriptor = mock(DataChannelDescriptor.class);
+        handler.processModel(descriptor);
+        verifyZeroInteractions(descriptor);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V9Test.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V9Test.java b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V9Test.java
new file mode 100644
index 0000000..1affb2c
--- /dev/null
+++ b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V9Test.java
@@ -0,0 +1,69 @@
+/*****************************************************************
+ *   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.cayenne.project.upgrade.handlers;
+
+import org.apache.cayenne.configuration.DataChannelDescriptor;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verifyZeroInteractions;
+
+/**
+ * @since 4.1
+ */
+public class UpgradeHandler_V9Test extends BaseUpgradeHandlerTest {
+
+
+    @Override
+    UpgradeHandler newHandler() {
+        return new UpgradeHandler_V9();
+    }
+
+    @Test
+    public void testProjectDomUpgrade() throws Exception {
+        Document document = processProjectDom("cayenne-project-v8.xml");
+
+        Element root = document.getDocumentElement();
+        assertEquals("9", root.getAttribute("project-version"));
+        assertEquals("", root.getAttribute("xmlns"));
+        assertEquals(2, root.getElementsByTagName("map").getLength());
+    }
+
+    @Test
+    public void testDataMapDomUpgrade() throws Exception {
+        Document document = processDataMapDom("test-map-v8.map.xml");
+
+        Element root = document.getDocumentElement();
+        assertEquals("9", root.getAttribute("project-version"));
+        assertEquals("http://cayenne.apache.org/schema/9/modelMap", root.getAttribute("xmlns"));
+        assertEquals(0, root.getElementsByTagName("reverse-engineering-config").getLength());
+        assertEquals(2, root.getElementsByTagName("db-attribute").getLength());
+    }
+
+    @Test
+    public void testModelUpgrade() throws Exception {
+        DataChannelDescriptor descriptor = mock(DataChannelDescriptor.class);
+        handler.processModel(descriptor);
+        verifyZeroInteractions(descriptor);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v7/ProjectUpgrader_V7Test.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v7/ProjectUpgrader_V7Test.java b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v7/ProjectUpgrader_V7Test.java
deleted file mode 100644
index 8dd51a2..0000000
--- a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v7/ProjectUpgrader_V7Test.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*****************************************************************
- *   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.cayenne.project.upgrade.v7;
-
-import org.apache.cayenne.configuration.ConfigurationNameMapper;
-import org.apache.cayenne.configuration.DataMapLoader;
-import org.apache.cayenne.configuration.DefaultConfigurationNameMapper;
-import org.apache.cayenne.configuration.XMLDataMapLoader;
-import org.apache.cayenne.configuration.server.JNDIDataSourceFactory;
-import org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory;
-import org.apache.cayenne.di.*;
-import org.apache.cayenne.di.spi.DefaultAdhocObjectFactory;
-import org.apache.cayenne.di.spi.DefaultClassLoaderManager;
-import org.apache.cayenne.project.FileProjectSaver;
-import org.apache.cayenne.project.ProjectSaver;
-import org.apache.cayenne.project.unit.Project2Case;
-import org.apache.cayenne.project.upgrade.UpgradeHandler;
-import org.apache.cayenne.project.upgrade.UpgradeMetaData;
-import org.apache.cayenne.project.upgrade.UpgradeType;
-import org.apache.cayenne.resource.Resource;
-import org.apache.cayenne.resource.URLResource;
-import org.apache.cayenne.test.resource.ResourceUtil;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathFactory;
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.*;
-
-public class ProjectUpgrader_V7Test extends Project2Case {
-
-	@Test
-	public void testMetadata_3_0_0_1() {
-
-		String baseUrl = getClass().getPackage().getName().replace('.', '/');
-		URL url = getClass().getClassLoader().getResource(baseUrl + "/3_0_0_1a/cayenne.xml");
-		assertNotNull(url);
-
-		Module testModule = new Module() {
-
-			public void configure(Binder binder) {
-				binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-				binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-			}
-		};
-
-		ProjectUpgrader_V7 upgrader = new ProjectUpgrader_V7();
-		Injector injector = DIBootstrap.createInjector(testModule);
-		injector.injectMembers(upgrader);
-
-		Resource source = new URLResource(url);
-		UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-
-		assertNotNull(handler);
-		assertSame(source, handler.getProjectSource());
-
-		UpgradeMetaData md = handler.getUpgradeMetaData();
-		assertNotNull(md);
-
-		assertSame(UpgradeType.UPGRADE_NEEDED, md.getUpgradeType());
-		assertNull(md.getIntermediateUpgradeVersion());
-		assertEquals("3.0.0.1", md.getProjectVersion());
-		assertEquals("7", md.getSupportedVersion());
-	}
-
-	@Test
-	public void testMetadata_Type2_0() {
-		String baseUrl = getClass().getPackage().getName().replace('.', '/');
-		URL url = getClass().getClassLoader().getResource(baseUrl + "/2_0a/cayenne.xml");
-		assertNotNull(url);
-
-		Module testModule = new Module() {
-
-			public void configure(Binder binder) {
-				binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-				binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-			}
-		};
-
-		ProjectUpgrader_V7 upgrader = new ProjectUpgrader_V7();
-		Injector injector = DIBootstrap.createInjector(testModule);
-		injector.injectMembers(upgrader);
-
-		Resource source = new URLResource(url);
-		UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-
-		assertNotNull(handler);
-		assertSame(source, handler.getProjectSource());
-
-		UpgradeMetaData md = handler.getUpgradeMetaData();
-		assertNotNull(md);
-		assertSame(UpgradeType.INTERMEDIATE_UPGRADE_NEEDED, md.getUpgradeType());
-		assertEquals("3.0.0.1", md.getIntermediateUpgradeVersion());
-		assertEquals("2.0", md.getProjectVersion());
-		assertEquals("7", md.getSupportedVersion());
-	}
-
-	@Test
-	public void testMetadata_Type6() {
-		String baseUrl = getClass().getPackage().getName().replace('.', '/');
-		URL url = getClass().getClassLoader().getResource(baseUrl + "/6a/cayenne-PROJECT1.xml");
-		assertNotNull(url);
-
-		Module testModule = new Module() {
-
-			public void configure(Binder binder) {
-				binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-				binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-			}
-		};
-
-		ProjectUpgrader_V7 upgrader = new ProjectUpgrader_V7();
-		Injector injector = DIBootstrap.createInjector(testModule);
-		injector.injectMembers(upgrader);
-
-		Resource source = new URLResource(url);
-		UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-
-		assertNotNull(handler);
-		assertSame(source, handler.getProjectSource());
-
-		UpgradeMetaData md = handler.getUpgradeMetaData();
-		assertNotNull(md);
-		assertSame(UpgradeType.UPGRADE_NEEDED, md.getUpgradeType());
-		assertNull(md.getIntermediateUpgradeVersion());
-		assertEquals("6", md.getProjectVersion());
-		assertEquals("7", md.getSupportedVersion());
-	}
-
-	@Test
-	public void testMetadata_Type7() {
-		String baseUrl = getClass().getPackage().getName().replace('.', '/');
-		URL url = getClass().getClassLoader().getResource(baseUrl + "/7a/cayenne-PROJECT1.xml");
-		assertNotNull(url);
-
-		Module testModule = new Module() {
-
-			public void configure(Binder binder) {
-				binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-				binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-			}
-		};
-
-		ProjectUpgrader_V7 upgrader = new ProjectUpgrader_V7();
-		Injector injector = DIBootstrap.createInjector(testModule);
-		injector.injectMembers(upgrader);
-
-		Resource source = new URLResource(url);
-		UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-
-		assertNotNull(handler);
-		assertSame(source, handler.getProjectSource());
-
-		UpgradeMetaData md = handler.getUpgradeMetaData();
-		assertNotNull(md);
-		assertSame(UpgradeType.UPGRADE_NOT_NEEDED, md.getUpgradeType());
-		assertNull(md.getIntermediateUpgradeVersion());
-		assertEquals("7", md.getProjectVersion());
-		assertEquals("7", md.getSupportedVersion());
-	}
-
-	@Test
-	public void testPerformUpgradeFrom3() throws Exception {
-
-		File testFolder = setupTestDirectory("testPerformUpgrade_3_0_0_1");
-		String sourceUrl = getClass().getPackage().getName().replace('.', '/') + "/3_0_0_1a/";
-
-		List<String> sources = new ArrayList<String>();
-
-		sources.add("cayenne.xml");
-		sources.add("d1Map1.map.xml");
-		sources.add("d1Map2.map.xml");
-		sources.add("d1NodeDriver.driver.xml");
-
-		// upgrades are done in-place, so copy it first
-		List<File> targetsBefore = new ArrayList<File>();
-		for (String source : sources) {
-
-			URL url = getClass().getClassLoader().getResource(sourceUrl + source);
-			File target = new File(testFolder, source);
-			assertNotNull(source);
-			ResourceUtil.copyResourceToFile(url, target);
-			targetsBefore.add(target);
-		}
-
-		Module testModule = new Module() {
-
-			public void configure(Binder binder) {
-				binder.bind(ClassLoaderManager.class).to(DefaultClassLoaderManager.class);
-				binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
-				binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-				binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-				binder.bind(DataMapLoader.class).to(XMLDataMapLoader.class);
-			}
-		};
-
-		ProjectUpgrader_V7 upgrader = new ProjectUpgrader_V7();
-		Injector injector = DIBootstrap.createInjector(testModule);
-		injector.injectMembers(upgrader);
-
-		Resource source = new URLResource(targetsBefore.get(0).toURI().toURL());
-		UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-
-		Resource upgraded = handler.performUpgrade();
-		assertNotNull(upgraded);
-		assertNotSame(source, upgrader);
-
-		// check that all the new files are created...
-		String[] targetsAfterNames = new String[] { "cayenne-d1.xml", "cayenne-d2.xml", "d1Map1.map.xml",
-				"d1Map2.map.xml" };
-
-		File[] targetsAfter = new File[targetsAfterNames.length];
-		for (int i = 0; i < targetsAfter.length; i++) {
-			targetsAfter[i] = new File(testFolder, targetsAfterNames[i]);
-			assertTrue("File was not created: " + targetsAfter[i].getAbsolutePath(), targetsAfter[i].exists());
-		}
-
-		// DataMap files should remain the same; all others need to be deleted
-		for (File file : targetsBefore) {
-			if (file.getName().endsWith(".map.xml")) {
-				assertTrue("DataMap file disappeared: " + file.getAbsolutePath(), file.exists());
-			} else {
-				assertFalse("File expected to be deleted: " + file.getAbsolutePath(), file.exists());
-			}
-		}
-
-		// assert XML structure of the generated files
-		assertPerformUpgrade_3_0_0_1_cayenne_d1(targetsAfter[0]);
-		assertPerformUpgrade_3_0_0_1_cayenne_d2(targetsAfter[1]);
-		assertPerformUpgrade_3_0_0_1_d1Map1(targetsAfter[2]);
-		assertPerformUpgrade_3_0_0_1_d1Map2(targetsAfter[3]);
-	}
-
-	private void assertPerformUpgrade_3_0_0_1_cayenne_d1(File file) throws Exception {
-		Document document = toDOMTree(file);
-
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		assertEquals("", xpath.evaluate("/domain/@name", document));
-		assertEquals("9", xpath.evaluate("/domain/@project-version", document));
-
-		NodeList maps = (NodeList) xpath.evaluate("/domain/map", document, XPathConstants.NODESET);
-		assertNotNull(maps);
-		assertEquals(2, maps.getLength());
-
-		Node map1 = maps.item(0);
-		Node map2 = maps.item(1);
-
-		assertEquals("d1Map1", xpath.evaluate("@name", map1));
-		assertEquals("d1Map2", xpath.evaluate("@name", map2));
-
-		NodeList nodes = (NodeList) xpath.evaluate("/domain/node", document, XPathConstants.NODESET);
-		assertNotNull(nodes);
-		assertEquals(1, nodes.getLength());
-
-		Node node1 = nodes.item(0);
-
-		assertEquals("d1NodeDriver", xpath.evaluate("@name", node1));
-		assertEquals(XMLPoolingDataSourceFactory.class.getName(), xpath.evaluate("@factory", node1));
-
-		NodeList mapRefs = (NodeList) xpath.evaluate("map-ref", node1, XPathConstants.NODESET);
-		assertNotNull(mapRefs);
-		assertEquals(2, mapRefs.getLength());
-
-		assertEquals("d1Map1", xpath.evaluate("@name", mapRefs.item(0)));
-		assertEquals("d1Map2", xpath.evaluate("@name", mapRefs.item(1)));
-
-		NodeList dataSources = (NodeList) xpath.evaluate("data-source", node1, XPathConstants.NODESET);
-		assertNotNull(dataSources);
-		assertEquals(1, dataSources.getLength());
-
-		Node ds = dataSources.item(0);
-		assertEquals("org.hsqldb.jdbcDriver", xpath.evaluate("driver/@value", ds));
-		assertEquals("jdbc:hsqldb:mem:xdb", xpath.evaluate("url/@value", ds));
-	}
-
-	private void assertPerformUpgrade_3_0_0_1_cayenne_d2(File file) throws Exception {
-		Document document = toDOMTree(file);
-
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		assertEquals("", xpath.evaluate("/domain/@name", document));
-		assertEquals("9", xpath.evaluate("/domain/@project-version", document));
-
-		NodeList maps = (NodeList) xpath.evaluate("/domain/map", document, XPathConstants.NODESET);
-		assertNotNull(maps);
-		assertEquals(0, maps.getLength());
-
-		NodeList nodes = (NodeList) xpath.evaluate("/domain/node", document, XPathConstants.NODESET);
-		assertNotNull(nodes);
-		assertEquals(2, nodes.getLength());
-
-		Node node1 = nodes.item(0);
-		Node node2 = nodes.item(1);
-
-		assertEquals("d2NodeDBCP", xpath.evaluate("@name", node1));
-		assertEquals("dbcpx", xpath.evaluate("@parameters", node1));
-		assertEquals("org.apache.cayenne.configuration.server.DBCPDataSourceFactory", xpath.evaluate("@factory", node1));
-
-		NodeList dataSources1 = (NodeList) xpath.evaluate("data-source", node1, XPathConstants.NODESET);
-		assertNotNull(dataSources1);
-		assertEquals(0, dataSources1.getLength());
-
-		assertEquals("d2NodeJNDI", xpath.evaluate("@name", node2));
-		assertEquals("jndi/x", xpath.evaluate("@parameters", node2));
-		assertEquals(JNDIDataSourceFactory.class.getName(), xpath.evaluate("@factory", node2));
-
-		NodeList dataSources2 = (NodeList) xpath.evaluate("data-source", node2, XPathConstants.NODESET);
-		assertNotNull(dataSources2);
-		assertEquals(0, dataSources2.getLength());
-	}
-
-	private void assertPerformUpgrade_3_0_0_1_d1Map1(File file) throws Exception {
-		Document document = toDOMTree(file);
-
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-	}
-
-	private void assertPerformUpgrade_3_0_0_1_d1Map2(File file) throws Exception {
-		Document document = toDOMTree(file);
-
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-	}
-
-	@Test
-	public void testPerformUpgradeFrom6() throws Exception {
-		File testFolder = setupTestDirectory("testUpgrade6a");
-		String sourceUrl = getClass().getPackage().getName().replace('.', '/') + "/6a/";
-		Module testModule = new Module() {
-
-			public void configure(Binder binder) {
-				binder.bind(ClassLoaderManager.class).to(DefaultClassLoaderManager.class);
-				binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
-
-				binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-				binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-				binder.bind(DataMapLoader.class).to(XMLDataMapLoader.class);
-			}
-		};
-
-		String[] resources = { "cayenne-PROJECT1.xml", "testProjectMap1_1.map.xml", "testProjectMap1_2.map.xml" };
-		List<File> files = new ArrayList<File>();
-
-		for (String name : resources) {
-			URL xmlUrl = getClass().getClassLoader().getResource(sourceUrl + name);
-			File target = new File(testFolder, name);
-			ResourceUtil.copyResourceToFile(xmlUrl, target);
-			files.add(target);
-		}
-
-		Injector injector = DIBootstrap.createInjector(testModule);
-		ProjectUpgrader_V7 upgrader = new ProjectUpgrader_V7();
-		injector.injectMembers(upgrader);
-
-		Resource source = new URLResource(files.get(0).toURI().toURL());
-		assertNotNull(source);
-		UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-		assertNotNull(handler);
-
-		Resource upgraded = handler.performUpgrade();
-		assertNotNull(upgraded);
-		assertNotSame(source, upgraded);
-
-		assertPerformUpgrade6Cayenne(files.get(0));
-		assertPerformUpgrade6Map1(files.get(1));
-		assertPerformUpgradeMap2(files.get(2));
-	}
-
-	private void assertPerformUpgrade6Map1(File file) throws Exception {
-		Document document = toDOMTree(file);
-
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-
-		NodeList maps = (NodeList) xpath.evaluate("/data-map/obj-entity/entity-listener", document,
-				XPathConstants.NODESET);
-		assertNotNull(maps);
-		assertEquals(0, maps.getLength());
-	}
-
-	private void assertPerformUpgrade6Cayenne(File file) throws Exception {
-		Document document = toDOMTree(file);
-
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		assertEquals("9", xpath.evaluate("/domain/@project-version", document));
-	}
-
-	private void assertPerformUpgradeMap2(File file) throws Exception {
-		Document document = toDOMTree(file);
-
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-	}
-
-	@Test
-	public void testObjAttributeDelete() throws Exception {
-
-		File testFolder = setupTestDirectory("testObjAttribute");
-		String sourceUrl = getClass().getPackage().getName().replace('.', '/') + "/6a/delete_shadow_attributes/";
-
-		Module testModule = new Module() {
-
-			public void configure(Binder binder) {
-				binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-				binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-				binder.bind(ClassLoaderManager.class).to(DefaultClassLoaderManager.class);
-				binder.bind(DataMapLoader.class).to(XMLDataMapLoader.class);
-				binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
-			}
-		};
-
-		ArrayList<String> source = new ArrayList<String>();
-		source.add("cayenne-TestProject.xml");
-		source.add("testProjectMap1.map.xml");
-		source.add("testProjectMap2.map.xml");
-
-		ArrayList<File> file = new ArrayList<File>();
-
-		for (String name : source) {
-			URL xmlUrl = getClass().getClassLoader().getResource(sourceUrl + name);
-			File target = new File(testFolder, name);
-			ResourceUtil.copyResourceToFile(xmlUrl, target);
-			file.add(target);
-		}
-
-		Injector injector = DIBootstrap.createInjector(testModule);
-		ProjectUpgrader_V7 upgrader = new ProjectUpgrader_V7();
-		injector.injectMembers(upgrader);
-
-		Resource resource = new URLResource(file.get(0).toURI().toURL());
-		assertNotNull(resource);
-		UpgradeHandler handler = upgrader.getUpgradeHandler(resource);
-		assertNotNull(handler);
-
-		Resource upgraded = handler.performUpgrade();
-		assertNotNull(upgraded);
-		assertNotSame(resource, upgraded);
-
-		assertPerformUpgrade6Cayenne(file.get(0));
-		assertObjAttributeMap1(file.get(1));
-		assertObjAttributeMap2(file.get(2));
-	}
-
-	private void assertObjAttributeMap1(File file) throws Exception {
-		Document document = toDOMTree(file);
-
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-
-		String xpathValue = "/data-map/obj-entity[@name='GreatArtist']/obj-attribute";
-		XPathExpression expr = xpath.compile(xpathValue);
-		Node node = (Node) expr.evaluate(document, XPathConstants.NODE);
-
-		assertEquals("attribute2", xpath.evaluate("@name", node));
-	}
-
-	private void assertObjAttributeMap2(File file) throws Exception {
-		Document document = toDOMTree(file);
-
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-
-		String xpath_1 = "/data-map/obj-entity[@name='House']/obj-attribute/@name";
-		String xpath_2 = "/data-map/obj-entity[@name='Penthouse']/obj-attribute/@name";
-		XPathExpression expr = xpath.compile(xpath_1);
-		String houseAttr = (String) expr.evaluate(document, XPathConstants.STRING);
-		expr = xpath.compile(xpath_2);
-		String penthouseAttr = (String) expr.evaluate(document, XPathConstants.STRING);
-
-		assertEquals("attribute2", houseAttr);
-		assertEquals("attribute3", penthouseAttr);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v8/ProjectUpgrader_V8Test.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v8/ProjectUpgrader_V8Test.java b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v8/ProjectUpgrader_V8Test.java
deleted file mode 100644
index 610d77c..0000000
--- a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v8/ProjectUpgrader_V8Test.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*****************************************************************
- *   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.cayenne.project.upgrade.v8;
-
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.configuration.ConfigurationNameMapper;
-import org.apache.cayenne.configuration.DataMapLoader;
-import org.apache.cayenne.configuration.DefaultConfigurationNameMapper;
-import org.apache.cayenne.configuration.XMLDataMapLoader;
-import org.apache.cayenne.di.*;
-import org.apache.cayenne.di.spi.DefaultAdhocObjectFactory;
-import org.apache.cayenne.di.spi.DefaultClassLoaderManager;
-import org.apache.cayenne.project.FileProjectSaver;
-import org.apache.cayenne.project.ProjectSaver;
-import org.apache.cayenne.project.unit.Project2Case;
-import org.apache.cayenne.project.upgrade.UpgradeHandler;
-import org.apache.cayenne.resource.Resource;
-import org.apache.cayenne.resource.URLResource;
-import org.apache.cayenne.test.file.FileUtil;
-import org.apache.cayenne.test.resource.ResourceUtil;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathFactory;
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.junit.Assert.*;
-
-public class ProjectUpgrader_V8Test extends Project2Case {
-
-    protected File setupTestDirectory(String subfolder) {
-        String classPath = getClass().getName().replace('.', '/');
-        String location = "target/testrun/" + classPath + "/" + subfolder;
-        File testDirectory = new File(location);
-
-        // delete old tests
-        if (testDirectory.exists()) {
-            if (!FileUtil.delete(location, true)) {
-                throw new CayenneRuntimeException(
-                        "Error deleting test directory '%s'",
-                        location);
-            }
-        }
-
-        if (!testDirectory.mkdirs()) {
-            throw new CayenneRuntimeException(
-                    "Error creating test directory '%s'",
-                    location);
-        }
-
-        return testDirectory;
-    }
-
-    @Test
-    public void testPerformUpgrade() throws Exception {
-
-        File testFolder = setupTestDirectory("testPerformUpgrade_7");
-        String sourceUrl = getClass().getPackage().getName().replace('.', '/') + "/7a/";
-
-        List<String> sources = new ArrayList<>();
-
-        sources.add("cayenne-PROJECT1.xml");
-        sources.add("testProjectMap1_1.map.xml");
-        sources.add("testProjectMap1_2.map.xml");
-
-        // upgrades are done in-place, so copy it first
-        List<File> targetsBefore = new ArrayList<>();
-        for (String source : sources) {
-
-            URL url = getClass().getClassLoader().getResource(sourceUrl + source);
-            File target = new File(testFolder, source);
-            assertNotNull(source);
-            ResourceUtil.copyResourceToFile(url, target);
-            targetsBefore.add(target);
-        }
-
-        Module testModule = new Module() {
-
-            public void configure(Binder binder) {
-                binder.bind(ClassLoaderManager.class).to(DefaultClassLoaderManager.class);
-                binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
-                binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-                binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-                binder.bind(DataMapLoader.class).to(XMLDataMapLoader.class);
-            }
-        };
-
-        ProjectUpgrader_V8 upgrader = new ProjectUpgrader_V8();
-        Injector injector = DIBootstrap.createInjector(testModule);
-        injector.injectMembers(upgrader);
-
-        Resource source = new URLResource(targetsBefore.get(0).toURL());
-        UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-
-        Resource upgraded = handler.performUpgrade();
-        assertNotNull(upgraded);
-        assertNotSame(source, upgrader);
-
-        // check that all the new files are created...
-        String[] targetsAfterNames = new String[] {
-                "cayenne-PROJECT1.xml", "testProjectMap1_1.map.xml", "testProjectMap1_2.map.xml"
-        };
-
-        File[] targetsAfter = new File[targetsAfterNames.length];
-        for (int i = 0; i < targetsAfter.length; i++) {
-            targetsAfter[i] = new File(testFolder, targetsAfterNames[i]);
-            assertTrue("File was not created: " + targetsAfter[i].getAbsolutePath(), targetsAfter[i].exists());
-        }
-
-        // assert XML structure of the generated files
-        assertPerformUpgrade_7_cayenne(targetsAfter[0]);
-        assertPerformUpgrade_map1_1(targetsAfter[1]);
-        assertPerformUpgrade_map1_2(targetsAfter[2]);
-    }
-
-    private void assertPerformUpgrade_7_cayenne(File file) throws Exception {
-        Document document = toDOMTree(file);
-
-        XPath xpath = XPathFactory.newInstance().newXPath();
-        assertEquals("", xpath.evaluate("/domain/@name", document));
-        assertEquals("9", xpath.evaluate("/domain/@project-version", document));
-
-        NodeList maps = (NodeList) xpath.evaluate("/domain/map", document, XPathConstants.NODESET);
-        assertNotNull(maps);
-        assertEquals(2, maps.getLength());
-
-        Node map1 = maps.item(0);
-        Node map2 = maps.item(1);
-
-        assertEquals("testProjectMap1_1", xpath.evaluate("@name", map1));
-        assertEquals("testProjectMap1_2", xpath.evaluate("@name", map2));
-
-        NodeList nodes = (NodeList) xpath.evaluate("/domain/node", document, XPathConstants.NODESET);
-        assertNotNull(nodes);
-        assertEquals(1, nodes.getLength());
-    }
-
-    private void assertPerformUpgrade_map1_1(File file) throws Exception {
-        Document document = toDOMTree(file);
-
-        XPath xpath = XPathFactory.newInstance().newXPath();
-        assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-
-        NodeList queryNodes = (NodeList) xpath.evaluate("/data-map/query", document, XPathConstants.NODESET);
-        assertNotNull(queryNodes);
-
-        Map<String, Element> queries = new HashMap<>();
-
-        for (int i = 0; i < queryNodes.getLength(); i++) {
-            Element query = (Element) queryNodes.item(i);
-            queries.put(query.getAttribute("name"), query);
-        }
-
-        assertEquals("", queries.get("EjbqlQueryTest").getAttribute("factory"));
-        assertEquals("", queries.get("SQLTemplateTest").getAttribute("factory"));
-        assertEquals("", queries.get("SelectQueryTest").getAttribute("factory"));
-        assertEquals("", queries.get("ProcedureQueryTest").getAttribute("factory"));
-
-        assertEquals("EJBQLQuery", queries.get("EjbqlQueryTest").getAttribute("type"));
-        assertEquals("SQLTemplate", queries.get("SQLTemplateTest").getAttribute("type"));
-        assertEquals("SelectQuery", queries.get("SelectQueryTest").getAttribute("type"));
-        assertEquals("ProcedureQuery", queries.get("ProcedureQueryTest").getAttribute("type"));
-    }
-
-    private void assertPerformUpgrade_map1_2(File file) throws Exception {
-        Document document = toDOMTree(file);
-
-        XPath xpath = XPathFactory.newInstance().newXPath();
-        assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v9/ProjectUpgrader_V9Test.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v9/ProjectUpgrader_V9Test.java b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v9/ProjectUpgrader_V9Test.java
deleted file mode 100644
index 3851a2e..0000000
--- a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v9/ProjectUpgrader_V9Test.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*****************************************************************
- *   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.cayenne.project.upgrade.v9;
-
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.configuration.ConfigurationNameMapper;
-import org.apache.cayenne.configuration.DataMapLoader;
-import org.apache.cayenne.configuration.DefaultConfigurationNameMapper;
-import org.apache.cayenne.configuration.XMLDataMapLoader;
-import org.apache.cayenne.di.*;
-import org.apache.cayenne.di.spi.DefaultAdhocObjectFactory;
-import org.apache.cayenne.di.spi.DefaultClassLoaderManager;
-import org.apache.cayenne.project.FileProjectSaver;
-import org.apache.cayenne.project.ProjectSaver;
-import org.apache.cayenne.project.unit.Project2Case;
-import org.apache.cayenne.project.upgrade.UpgradeHandler;
-import org.apache.cayenne.project.upgrade.UpgradeMetaData;
-import org.apache.cayenne.project.upgrade.UpgradeType;
-import org.apache.cayenne.resource.Resource;
-import org.apache.cayenne.resource.URLResource;
-import org.apache.cayenne.test.file.FileUtil;
-import org.apache.cayenne.test.resource.ResourceUtil;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathFactory;
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.*;
-
-public class ProjectUpgrader_V9Test extends Project2Case {
-
-    @Test
-    public void testMetadata_3_0_0_1() {
-
-        String baseUrl = getClass().getPackage().getName().replace('.', '/');
-        URL url = getClass().getClassLoader().getResource(baseUrl + "/3_0_0_1a/cayenne.xml");
-        assertNotNull(url);
-
-        Module testModule = new Module() {
-
-            public void configure(Binder binder) {
-                binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-                binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-            }
-        };
-
-        ProjectUpgrader_V9 upgrader = new ProjectUpgrader_V9();
-        Injector injector = DIBootstrap.createInjector(testModule);
-        injector.injectMembers(upgrader);
-
-        Resource source = new URLResource(url);
-        UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-
-        assertNotNull(handler);
-        assertSame(source, handler.getProjectSource());
-
-        UpgradeMetaData md = handler.getUpgradeMetaData();
-        assertNotNull(md);
-
-        assertSame(UpgradeType.UPGRADE_NEEDED, md.getUpgradeType());
-        assertNull(md.getIntermediateUpgradeVersion());
-        assertEquals("3.0.0.1", md.getProjectVersion());
-        assertEquals("9", md.getSupportedVersion());
-    }
-
-    @Test
-    public void testMetadata_Type6() {
-        String baseUrl = getClass().getPackage().getName().replace('.', '/');
-        URL url = getClass().getClassLoader().getResource(baseUrl + "/6a/cayenne-PROJECT1.xml");
-        assertNotNull(url);
-
-        Module testModule = new Module() {
-
-            public void configure(Binder binder) {
-                binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-                binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-            }
-        };
-
-        ProjectUpgrader_V9 upgrader = new ProjectUpgrader_V9();
-        Injector injector = DIBootstrap.createInjector(testModule);
-        injector.injectMembers(upgrader);
-
-        Resource source = new URLResource(url);
-        UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-
-        assertNotNull(handler);
-        assertSame(source, handler.getProjectSource());
-
-        UpgradeMetaData md = handler.getUpgradeMetaData();
-        assertNotNull(md);
-        assertSame(UpgradeType.UPGRADE_NEEDED, md.getUpgradeType());
-        assertNull(md.getIntermediateUpgradeVersion());
-        assertEquals("6", md.getProjectVersion());
-        assertEquals("9", md.getSupportedVersion());
-    }
-
-    protected File setupTestDirectory(String subfolder) {
-        String classPath = getClass().getName().replace('.', '/');
-        String location = "target/testrun/" + classPath + "/" + subfolder;
-        File testDirectory = new File(location);
-
-        // delete old tests
-        if (testDirectory.exists()) {
-            if (!FileUtil.delete(location, true)) {
-                throw new CayenneRuntimeException(
-                        "Error deleting test directory '%s'",
-                        location);
-            }
-        }
-
-        if (!testDirectory.mkdirs()) {
-            throw new CayenneRuntimeException(
-                    "Error creating test directory '%s'",
-                    location);
-        }
-
-        return testDirectory;
-    }
-
-    @Test
-    public void testPerformUpgradeFrom8() throws Exception {
-
-        File testFolder = setupTestDirectory("testPerformUpgradeFrom8");
-        String sourceUrl = getClass().getPackage().getName().replace('.', '/') + "/";
-
-        List<String> sources = new ArrayList<>();
-
-        sources.add("cayenne-PROJECT1.xml");
-        sources.add("testProjectMap1_1.map.xml");
-        sources.add("testProjectMap1_2.map.xml");
-        sources.add("reverseEngineering.xml");
-
-        // upgrades are done in-place, so copy it first
-        List<File> targetsBefore = new ArrayList<>();
-        for (String source : sources) {
-
-            URL url = getClass().getClassLoader().getResource(sourceUrl + source);
-            File target = new File(testFolder, source);
-            assertNotNull(source);
-            ResourceUtil.copyResourceToFile(url, target);
-            targetsBefore.add(target);
-        }
-
-        Module testModule = new Module() {
-
-            public void configure(Binder binder) {
-                binder.bind(ClassLoaderManager.class).to(DefaultClassLoaderManager.class);
-                binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
-                binder.bind(ProjectSaver.class).to(FileProjectSaver.class);
-                binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
-                binder.bind(DataMapLoader.class).to(XMLDataMapLoader.class);
-            }
-        };
-
-        ProjectUpgrader_V9 upgrader = new ProjectUpgrader_V9();
-        Injector injector = DIBootstrap.createInjector(testModule);
-        injector.injectMembers(upgrader);
-
-        Resource source = new URLResource(targetsBefore.get(0).toURI().toURL());
-        UpgradeHandler handler = upgrader.getUpgradeHandler(source);
-
-        Resource upgraded = handler.performUpgrade();
-        assertNotNull(upgraded);
-        assertNotSame(source, upgrader);
-
-        // check that all the new files are created...
-        String[] targetsAfterNames = new String[] {
-                "cayenne-PROJECT1.xml", "testProjectMap1_1.map.xml", "testProjectMap1_2.map.xml"
-        };
-
-        File[] targetsAfter = new File[targetsAfterNames.length];
-        for (int i = 0; i < targetsAfter.length; i++) {
-            targetsAfter[i] = new File(testFolder, targetsAfterNames[i]);
-            assertTrue("File was not created: " + targetsAfter[i].getAbsolutePath(), targetsAfter[i].exists());
-        }
-
-        // assert XML structure of the generated files
-        assertPerformUpgradeFrom8_cayenne(targetsAfter[0]);
-        assertPerformUpgradeFrom8_map1_1(targetsAfter[1]);
-        assertPerformUpgradeFrom8_map1_2(targetsAfter[2]);
-        assertFalse(new File(testFolder, "reverseEngineering.xml").exists());
-    }
-
-    private void assertPerformUpgradeFrom8_cayenne(File file) throws Exception {
-        Document document = toDOMTree(file);
-
-        XPath xpath = XPathFactory.newInstance().newXPath();
-        assertEquals("", xpath.evaluate("/domain/@name", document));
-        assertEquals("9", xpath.evaluate("/domain/@project-version", document));
-
-        NodeList maps = (NodeList) xpath.evaluate("/domain/map", document, XPathConstants.NODESET);
-        assertNotNull(maps);
-        assertEquals(2, maps.getLength());
-
-        Node map1 = maps.item(0);
-        Node map2 = maps.item(1);
-
-        assertEquals("testProjectMap1_1", xpath.evaluate("@name", map1));
-        assertEquals("testProjectMap1_2", xpath.evaluate("@name", map2));
-
-        NodeList nodes = (NodeList) xpath.evaluate("/domain/node", document, XPathConstants.NODESET);
-        assertNotNull(nodes);
-        assertEquals(1, nodes.getLength());
-    }
-
-    private void assertPerformUpgradeFrom8_map1_1(File file) throws Exception {
-        Document document = toDOMTree(file);
-
-        XPath xpath = XPathFactory.newInstance().newXPath();
-        assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-
-        NodeList reverseEngineeringNodes = (NodeList) xpath.evaluate("/data-map/reverse-engineering-config",
-                document, XPathConstants.NODESET);
-        assertEquals(0, reverseEngineeringNodes.getLength());
-    }
-
-    private void assertPerformUpgradeFrom8_map1_2(File file) throws Exception {
-        Document document = toDOMTree(file);
-
-        XPath xpath = XPathFactory.newInstance().newXPath();
-        assertEquals("9", xpath.evaluate("/data-map/@project-version", document));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT1.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT1.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT1.xml
index 31fb0d3..5b27d93 100644
--- a/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT1.xml
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT1.xml
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
-<domain name="DefaultDomain" project-version="6">
-
-	<map name="testProjectMap1_1" />
-	<map name="testProjectMap1_2" />
-
+<domain xmlns="http://cayenne.apache.org/schema/10/domain"
+	 project-version="10">
+	<map name="testProjectMap1_1"/>
+	<map name="testProjectMap1_2"/>
 	<node name="testProjectNode1"
-		adapter="org.example.test.Adapter" factory="org.example.test.DataSourceFactory">
+		 adapter="org.example.test.Adapter"
+		 factory="org.example.test.DataSourceFactory">
+		<map-ref name="testProjectMap1_1"/>
 		<data-source>
 			<connectionPool min="1" max="1" />
 			<login />
 		</data-source>
-		<map-ref name="testProjectMap1_1" />
 	</node>
 </domain>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT2.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT2.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT2.xml
index 7fba199..c83d807 100644
--- a/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT2.xml
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/cayenne-PROJECT2.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
-<domain name="DefaultDomain" project-version="6">
-
-	<map name="testProjectMap2_1" />
-	<map name="testProjectMap2_2" />
-
-	<node name="testProjectNode2" adapter="org.example.test.Adapter"
-		factory="org.apache.cayenne.configuration.XMLPoolingDataSourceFactory">
-		<map-ref name="testProjectMap2_1" />
+<domain xmlns="http://cayenne.apache.org/schema/10/domain"
+	 project-version="10">
+	<map name="testProjectMap2_1"/>
+	<map name="testProjectMap2_2"/>
+	<node name="testProjectNode2"
+		 adapter="org.example.test.Adapter"
+		 factory="org.apache.cayenne.configuration.XMLPoolingDataSourceFactory">
+		<map-ref name="testProjectMap2_1"/>
 		<data-source>
 			<driver value="xyzDriver"/>
 			<url value="xyzUrl"/>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_1.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_1.map.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_1.map.xml
index 6b79eb5..abbaaf3 100644
--- a/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_1.map.xml
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_1.map.xml
@@ -1,7 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	project-version="6">
-
-</data-map>
+<data-map xmlns="http://cayenne.apache.org/schema/10/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/10/modelMap http://cayenne.apache.org/schema/10/modelMap.xsd"
+	 project-version="10"/>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_2.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_2.map.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_2.map.xml
index 6b79eb5..abbaaf3 100644
--- a/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_2.map.xml
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap1_2.map.xml
@@ -1,7 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	project-version="6">
-
-</data-map>
+<data-map xmlns="http://cayenne.apache.org/schema/10/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/10/modelMap http://cayenne.apache.org/schema/10/modelMap.xsd"
+	 project-version="10"/>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_1.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_1.map.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_1.map.xml
index 6b79eb5..abbaaf3 100644
--- a/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_1.map.xml
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_1.map.xml
@@ -1,7 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	project-version="6">
-
-</data-map>
+<data-map xmlns="http://cayenne.apache.org/schema/10/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/10/modelMap http://cayenne.apache.org/schema/10/modelMap.xsd"
+	 project-version="10"/>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_2.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_2.map.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_2.map.xml
index 6b79eb5..abbaaf3 100644
--- a/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_2.map.xml
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/testProjectMap2_2.map.xml
@@ -1,7 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	project-version="6">
-
-</data-map>
+<data-map xmlns="http://cayenne.apache.org/schema/10/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/10/modelMap http://cayenne.apache.org/schema/10/modelMap.xsd"
+	 project-version="10"/>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v10.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v10.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v10.xml
new file mode 100644
index 0000000..c3f0681
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Fake version to test DefaultUpgradeService -->
+<domain project-version="10"/>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v11.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v11.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v11.xml
new file mode 100644
index 0000000..51f7c4c
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Fake version to test DefaultUpgradeService -->
+<domain project-version="11"/>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v3.2.1.0.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v3.2.1.0.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v3.2.1.0.xml
new file mode 100644
index 0000000..b8c95e1
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v3.2.1.0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Fake version to test DefaultUpgradeService -->
+<domain project-version="3.2.1.0"/>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v5.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v5.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v5.xml
new file mode 100644
index 0000000..0cb4160
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v5.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Fake version to test DefaultUpgradeService -->
+<domain project-version="5"/>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v6.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v6.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v6.xml
new file mode 100644
index 0000000..11735326
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v6.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<domain project-version="6">
+
+	<property name="cayenne.DataDomain.usingExternalTransactions" value="true"/>
+
+	<map name="testProjectMap1_1" />
+	<map name="testProjectMap1_2" />
+
+	<node name="testProjectNode1"
+		adapter="org.example.test.Adapter" factory="org.example.test.DataSourceFactory">
+		<data-source>
+			<connectionPool min="1" max="1" />
+			<login />
+		</data-source>
+		<map-ref name="testProjectMap1_1" />
+	</node>
+</domain>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v7.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v7.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v7.xml
new file mode 100644
index 0000000..7b4a247
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v7.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<domain project-version="7">
+
+	<map name="testProjectMap1_1" />
+	<map name="testProjectMap1_2" />
+
+	<node name="testProjectNode1"
+		adapter="org.example.test.Adapter" factory="org.example.test.DataSourceFactory">
+		<data-source>
+			<connectionPool min="1" max="1" />
+			<login />
+		</data-source>
+		<map-ref name="testProjectMap1_1" />
+	</node>
+</domain>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v8.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v8.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v8.xml
new file mode 100644
index 0000000..745ea3f
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v8.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<domain project-version="8">
+
+    <map name="testProjectMap1_1" />
+    <map name="testProjectMap1_2" />
+
+    <node name="testProjectNode1"
+          adapter="org.example.test.Adapter" factory="org.example.test.DataSourceFactory">
+        <data-source>
+            <connectionPool min="1" max="1" />
+            <login />
+        </data-source>
+        <map-ref name="testProjectMap1_1" />
+    </node>
+</domain>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v9.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v9.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v9.xml
new file mode 100644
index 0000000..52cf7b4
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/cayenne-project-v9.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<domain project-version="9">
+
+    <map name="testProjectMap1_1" />
+    <map name="testProjectMap1_2" />
+
+    <node name="testProjectNode1"
+          adapter="org.example.test.Adapter" factory="org.example.test.DataSourceFactory">
+        <data-source>
+            <connectionPool min="1" max="1" />
+            <login />
+        </data-source>
+        <map-ref name="testProjectMap1_1" />
+    </node>
+</domain>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v6.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v6.map.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v6.map.xml
new file mode 100644
index 0000000..25167f4
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v6.map.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+	project-version="6">
+<db-entity name="Artist">
+        <db-attribute name="attributeOne" type="CHAR" isPrimaryKey="true" isMandatory="true" length="10"/>
+        <db-attribute name="attributeTwo" type="DATE"/>
+    </db-entity>
+    <obj-entity name="Artist" dbEntityName="Artist">
+        <entity-listener class="EntityListener">
+            <post-add method-name="prePersistEntityListener"/>
+			<post-persist method-name="postPersistEntityListener"/>
+			<pre-update method-name="preUpdateEntityListener"/>
+			<post-update method-name="postUpdateEntityListener"/>
+			<pre-remove method-name="preRemoveEntityListener"/>
+			<post-remove method-name="postRemoveEntityListener"/>
+			<post-load method-name="postLoadEntityListener"/>
+        </entity-listener>
+    </obj-entity>
+</data-map>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v7.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v7.map.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v7.map.xml
new file mode 100644
index 0000000..dcc9580
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v7.map.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/7/modelMap"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://cayenne.apache.org/schema/7/modelMap http://cayenne.apache.org/schema/7/modelMap.xsd"
+          project-version="7">
+    <db-entity name="Artist">
+        <db-attribute name="untitledAttr" type="CHAR" isPrimaryKey="true" isMandatory="true" length="10"/>
+        <db-attribute name="untitledAttr1" type="DATE"/>
+    </db-entity>
+    <obj-entity name="Artist" dbEntityName="Artist">
+        <entity-listener class="NowyListener">
+        </entity-listener>
+    </obj-entity>
+    <query name="EjbqlQueryTest" factory="org.apache.cayenne.map.EjbqlBuilder">
+        <property name="cayenne.GenericSelectQuery.fetchingDataRows" value="true"/>
+        <property name="cayenne.GenericSelectQuery.cacheStrategy" value="SHARED_CACHE"/>
+        <ejbql><![CDATA[select a from Artist a]]></ejbql>
+    </query>
+    <query name="SQLTemplateTest" factory="org.apache.cayenne.map.SQLTemplateBuilder" root="data-map" root-name="testmap">
+        <property name="cayenne.SQLTemplate.columnNameCapitalization" value="UPPER"/>
+        <sql><![CDATA[INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE)
+VALUES (512, 'No Painting Like This', 12.5)]]></sql>
+        <sql adapter-class="org.apache.cayenne.dba.db2.DB2Adapter"><![CDATA[INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE) VALUES (512, 'No Painting Like This', 12.5)]]></sql>
+    </query>
+    <query name="SelectQueryTest" factory="org.apache.cayenne.map.SelectQueryBuilder" root="obj-entity" root-name="Painting">
+        <qualifier><![CDATA[toArtist = $artist]]></qualifier>
+        <ordering><![CDATA[paintingTitle]]></ordering>
+    </query>
+    <query name="ProcedureQueryTest" factory="org.apache.cayenne.map.ProcedureQueryBuilder" root="procedure" root-name="cayenne_tst_select_proc" result-entity="Artist">
+    </query>
+</data-map>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v8.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v8.map.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v8.map.xml
new file mode 100644
index 0000000..1464a49
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v8.map.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/8/modelMap"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://cayenne.apache.org/schema/8/modelMap http://cayenne.apache.org/schema/8/modelMap.xsd"
+          project-version="8">
+    <reverse-engineering-config name="reverseEngineering"/>
+    <db-entity name="Artist">
+        <db-attribute name="untitledAttr" type="CHAR" isPrimaryKey="true" isMandatory="true" length="10"/>
+        <db-attribute name="untitledAttr1" type="DATE"/>
+    </db-entity>
+    <obj-entity name="Artist" dbEntityName="Artist">
+    </obj-entity>
+</data-map>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/38553b16/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v9.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v9.map.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v9.map.xml
new file mode 100644
index 0000000..1787bf0
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v9.map.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd"
+          project-version="9">
+    <db-entity name="Artist">
+        <db-attribute name="untitledAttr" type="CHAR" isPrimaryKey="true" isMandatory="true" length="10"/>
+        <db-attribute name="untitledAttr1" type="DATE"/>
+    </db-entity>
+    <obj-entity name="Artist" dbEntityName="Artist">
+    </obj-entity>
+</data-map>


Mime
View raw message