cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject cayenne git commit: oops
Date Fri, 04 Nov 2016 15:37:31 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master b94638105 -> 65b5568d9


oops


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/65b5568d
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/65b5568d
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/65b5568d

Branch: refs/heads/master
Commit: 65b5568d9e76f51b71693a179ef74146e9c3ba9d
Parents: b946381
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Fri Nov 4 18:32:59 2016 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Fri Nov 4 18:33:32 2016 +0300

----------------------------------------------------------------------
 .../tools/DbImporterMojoConfigurationTest.java        |  6 ++++--
 .../org/apache/cayenne/tools/DbImporterMojoTest.java  | 14 ++++++++------
 2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/65b5568d/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java
b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java
index 20a65fa..5b871f6 100644
--- a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java
+++ b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java
@@ -25,6 +25,7 @@ import org.apache.cayenne.dbsync.reverse.filters.IncludeTableFilter;
 import org.apache.cayenne.dbsync.reverse.filters.PatternFilter;
 import org.apache.cayenne.dbsync.reverse.filters.TableFilter;
 import org.apache.cayenne.tools.dbimport.DbImportConfiguration;
+import org.apache.commons.logging.Log;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.junit.Test;
 
@@ -40,6 +41,7 @@ import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.as
 import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertSkipPrimaryKeyLoading;
 import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertSkipRelationshipsLoading;
 import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertTableTypes;
+import static org.mockito.Mockito.mock;
 
 public class DbImporterMojoConfigurationTest extends AbstractMojoTestCase {
 
@@ -71,7 +73,7 @@ public class DbImporterMojoConfigurationTest extends AbstractMojoTestCase
{
 
     @Test
     public void testLoadSchema2() throws Exception {
-        FiltersConfig filters = getCdbImport("pom-schema-2.xml").toParameters()
+        FiltersConfig filters = getCdbImport("pom-schema-2.xml").createConfig(mock(Log.class))
                 .getDbLoaderConfig().getFiltersConfig();
 
         TreeSet<IncludeTableFilter> includes = new TreeSet<>();
@@ -91,7 +93,7 @@ public class DbImporterMojoConfigurationTest extends AbstractMojoTestCase
{
 
     @Test
     public void testDefaultPackage() throws Exception {
-        DbImportConfiguration config = getCdbImport("pom-default-package.xml").toParameters();
+        DbImportConfiguration config = getCdbImport("pom-default-package.xml").createConfig(mock(Log.class));
         assertEquals("com.example.test", config.getDefaultPackage());
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/65b5568d/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
index 3fa9f2f..94d16fe 100644
--- a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
+++ b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
@@ -24,6 +24,7 @@ import org.apache.cayenne.dbimport.Schema;
 import org.apache.cayenne.test.jdbc.SQLReader;
 import org.apache.cayenne.test.resource.ResourceUtil;
 import org.apache.cayenne.tools.dbimport.DbImportConfiguration;
+import org.apache.commons.logging.Log;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.codehaus.plexus.util.FileUtils;
@@ -50,6 +51,7 @@ import java.util.Iterator;
 import java.util.Objects;
 
 import static org.apache.commons.lang.StringUtils.isBlank;
+import static org.mockito.Mockito.mock;
 
 
 public class DbImporterMojoTest extends AbstractMojoTestCase {
@@ -74,23 +76,23 @@ public class DbImporterMojoTest extends AbstractMojoTestCase {
     @Test
     public void testToParameters_MeaningfulPkTables() throws Exception {
 
-        DbImportConfiguration parameters1 = getCdbImport("dbimporter-pom1.xml").toParameters();
+        DbImportConfiguration parameters1 = getCdbImport("dbimporter-pom1.xml").createConfig(mock(Log.class));
         assertNull(parameters1.getMeaningfulPkTables());
         assertPathEquals("target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml",
parameters1.getTargetDataMap()
                 .getPath());
 
-        assertEquals("x,b*", getCdbImport("dbimporter-pom2.xml").toParameters().getMeaningfulPkTables());
-        assertEquals("*", getCdbImport("dbimporter-pom3.xml").toParameters().getMeaningfulPkTables());
+        assertEquals("x,b*", getCdbImport("dbimporter-pom2.xml").createConfig(mock(Log.class)).getMeaningfulPkTables());
+        assertEquals("*", getCdbImport("dbimporter-pom3.xml").createConfig(mock(Log.class)).getMeaningfulPkTables());
     }
 
     public void testToParameters_Map() throws Exception {
 
-        DbImportConfiguration parameters1 = getCdbImport("dbimporter-pom1.xml").toParameters();
+        DbImportConfiguration parameters1 = getCdbImport("dbimporter-pom1.xml").createConfig(mock(Log.class));
         assertNotNull(parameters1.getTargetDataMap());
         assertPathEquals("target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml",
parameters1.getTargetDataMap()
                 .getPath());
 
-        assertNull(getCdbImport("dbimporter-pom2.xml").toParameters().getTargetDataMap());
+        assertNull(getCdbImport("dbimporter-pom2.xml").createConfig(mock(Log.class)).getTargetDataMap());
     }
 
     private DbImporterMojo getCdbImport(String pomFileName) throws Exception {
@@ -309,7 +311,7 @@ public class DbImporterMojoTest extends AbstractMojoTestCase {
             mapFileCopy = mapFile;
         }
 
-        DbImportConfiguration parameters = cdbImport.toParameters();
+        DbImportConfiguration parameters = cdbImport.createConfig(mock(Log.class));
         prepareDatabase(name, parameters);
 
         try {


Mime
View raw message