Modified:
/trunk/regress/ca/sqlpower/matchmaker/MatchMakerTestCase.java
/trunk/regress/ca/sqlpower/matchmaker/ProjectTest.java
=======================================
--- /trunk/regress/ca/sqlpower/matchmaker/MatchMakerTestCase.java Mon Nov
1 08:24:26 2010
+++ /trunk/regress/ca/sqlpower/matchmaker/MatchMakerTestCase.java Mon Dec
6 14:41:47 2010
@@ -155,6 +155,19 @@
propertiesToIgnoreForDuplication.add("expanded");
propertiesToIgnoreForDuplication.add("position");
propertiesToIgnoreForDuplication.add("inputCount");
+ propertiesToIgnoreForDuplication.add("matchPool");
+ propertiesToIgnoreForDuplication.add("resultTableCatalog");
+ propertiesToIgnoreForDuplication.add("resultTableName");
+ propertiesToIgnoreForDuplication.add("resultTableSchema");
+ propertiesToIgnoreForDuplication.add("resultTableSPDataSource");
+ propertiesToIgnoreForDuplication.add("sourceTableCatalog");
+ propertiesToIgnoreForDuplication.add("sourceTableName");
+ propertiesToIgnoreForDuplication.add("sourceTableSchema");
+ propertiesToIgnoreForDuplication.add("sourceTableSPDataSource");
+ propertiesToIgnoreForDuplication.add("xrefTableCatalog");
+ propertiesToIgnoreForDuplication.add("xrefTableName");
+ propertiesToIgnoreForDuplication.add("xrefTableSchema");
+ propertiesToIgnoreForDuplication.add("xrefTableSPDataSource");
//this throws an exception if the DS does not exist
propertiesToIgnoreForDuplication.add("spDataSource");
=======================================
--- /trunk/regress/ca/sqlpower/matchmaker/ProjectTest.java Mon Nov 1
12:34:44 2010
+++ /trunk/regress/ca/sqlpower/matchmaker/ProjectTest.java Mon Dec 6
14:41:47 2010
@@ -26,6 +26,7 @@
import java.sql.Statement;
import java.sql.Types;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import ca.sqlpower.architect.ddl.DDLGenerator;
@@ -56,9 +57,10 @@
PlFolder parentFolder;
Project project;
- private TestingMatchMakerSession session;
+ private TestingMatchMakerSession session ;
protected void setUp() throws Exception {
+
// The following two are ignored because they are to be used only by
hibernate
// so they don't throw events
propertiesToIgnoreForEventGeneration.add("mungeProcesses");
@@ -285,6 +287,7 @@
project.setResultTableCatalog("my_cat");
project.setResultTableSchema("my_dog");
project.setResultTableName("my_chinchilla");
+ project.setResultTableSPDatasource("Test Sql Server");
SQLTable resultTable = project.createResultTable();
@@ -657,7 +660,22 @@
}
public void testNoEmptySimulatedTable() throws Exception {
-
+
+ session = new TestingMatchMakerSession() {
+ public SQLDatabase getDatabase(JDBCDataSource dataSource) {
+ return this.db;
+ };
+ };
+
+ JDBCDataSource dataSource = new JDBCDataSource(
+
((TestingMatchMakerContext)session.getContext()).getDataSources().get(0));
+ dataSource.setName("testing datasource");
+ ((TestingMatchMakerContext)session.getContext()).setDataSou2rces(
+ Collections.singletonList(dataSource));
+ session.setDatabase(new SQLDatabase());
+
+ project.setSession(session);
+
SQLTable sourceTable = new SQLTable(session.getDatabase(), true);
session.getDatabase().addChild(sourceTable);
sourceTable.addColumn(new SQLColumn(sourceTable, "pk1",
Types.INTEGER, 10, 0));
@@ -669,6 +687,7 @@
project.setResultTableCatalog(null);
project.setResultTableSchema(null);
project.setResultTableName("new_table_that_doesnt_exist");
+ project.setResultTableSPDatasource("testing datasource");
project.createResultTable();