Index: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/LoadForeignPropertiesTest.data |
— | — | @@ -1,23 +0,0 @@ |
2 | | -<?xml version='1.0' encoding='UTF-8'?> |
3 | | -<dataset> |
4 | | - <tripleImport external_authority="acme" external_id="FooBar" property="concept_name" value="FooBar" qualifier="dummy"/> |
5 | | - <tripleImport external_authority="acme" external_id="FooBar" property="firstName" value="Bar" qualifier="dummy"/> |
6 | | - <tripleImport external_authority="acme" external_id="FooBar" property="name" value="Foo" qualifier="dummy"/> |
7 | | - <tripleImport external_authority="acme" external_id="FooBar" property="phone" value="12345" qualifier="dummy"/> |
8 | | - |
9 | | - <tripleImport external_authority="acme" external_id="XyzzyQuux" property="concept_name" value="XyzzyQuux" qualifier="dummy"/> |
10 | | - <tripleImport external_authority="acme" external_id="XyzzyQuux" property="firstName" value="Quux" qualifier="dummy"/> |
11 | | - <tripleImport external_authority="acme" external_id="XyzzyQuux" property="name" value="Xyzzy" qualifier="dummy"/> |
12 | | - <tripleImport external_authority="acme" external_id="XyzzyQuux" property="phone" value="67890" qualifier="dummy"/> |
13 | | - |
14 | | - <tableImport external_authority="acme" external_id="FooBar" property="concept_name" value="FooBar" qualifier="dummy"/> |
15 | | - <tableImport external_authority="acme" external_id="FooBar" property="firstName" value="Bar" qualifier="dummy"/> |
16 | | - <tableImport external_authority="acme" external_id="FooBar" property="name" value="Foo" qualifier="dummy"/> |
17 | | - <tableImport external_authority="acme" external_id="FooBar" property="phone" value="12345" qualifier="dummy"/> |
18 | | - |
19 | | - <tableImport external_authority="acme" external_id="XyzzyQuux" property="concept_name" value="XyzzyQuux" qualifier="dummy"/> |
20 | | - <tableImport external_authority="acme" external_id="XyzzyQuux" property="firstName" value="Quux" qualifier="dummy"/> |
21 | | - <tableImport external_authority="acme" external_id="XyzzyQuux" property="name" value="Xyzzy" qualifier="dummy"/> |
22 | | - <tableImport external_authority="acme" external_id="XyzzyQuux" property="phone" value="67890" qualifier="dummy"/> |
23 | | -</dataset> |
24 | | - |
Index: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/LoadForeignPropertiesTest-tripleImport.expected.data |
— | — | @@ -0,0 +1,13 @@ |
| 2 | +<?xml version='1.0' encoding='UTF-8'?> |
| 3 | +<dataset> |
| 4 | + <TEST_xx_tripleImport external_authority="acme" external_id="FooBar" property="concept_name" value="FooBar" qualifier="dummy"/> |
| 5 | + <TEST_xx_tripleImport external_authority="acme" external_id="FooBar" property="firstName" value="Bar" qualifier="dummy"/> |
| 6 | + <TEST_xx_tripleImport external_authority="acme" external_id="FooBar" property="name" value="Foo" qualifier="dummy"/> |
| 7 | + <TEST_xx_tripleImport external_authority="acme" external_id="FooBar" property="phone" value="12345" qualifier="dummy"/> |
| 8 | + |
| 9 | + <TEST_xx_tripleImport external_authority="acme" external_id="XyzzyQuux" property="concept_name" value="XyzzyQuux" qualifier="dummy"/> |
| 10 | + <TEST_xx_tripleImport external_authority="acme" external_id="XyzzyQuux" property="firstName" value="Quux" qualifier="dummy"/> |
| 11 | + <TEST_xx_tripleImport external_authority="acme" external_id="XyzzyQuux" property="name" value="Xyzzy" qualifier="dummy"/> |
| 12 | + <TEST_xx_tripleImport external_authority="acme" external_id="XyzzyQuux" property="phone" value="67890" qualifier="dummy"/> |
| 13 | +</dataset> |
| 14 | + |
Index: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/LoadForeignPropertiesTest.java |
— | — | @@ -20,11 +20,11 @@ |
21 | 21 | |
22 | 22 | //----------------------------------------------------------------------------------------------------- |
23 | 23 | public void testTableImport() throws Exception { |
24 | | - runApp("tableImport", "external_authority", "external_id", "property", "value", "qualifier"); |
| 24 | + runApp("tableImport"); |
25 | 25 | } |
26 | 26 | |
27 | 27 | public void testTripleImport() throws Exception { |
28 | | - runApp("tripleImport", "external_authority", "external_id", "property", "value", "qualifier"); |
| 28 | + runApp("tripleImport"); |
29 | 29 | } |
30 | 30 | |
31 | 31 | @Override |
Index: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/IntegratorAppTestBase.java |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | return app; |
47 | 47 | } |
48 | 48 | |
49 | | - protected void runApp(String testName, String... orderBy) throws Exception { |
| 49 | + protected void runApp(String testName) throws Exception { |
50 | 50 | //get source description |
51 | 51 | FeatureSetSourceDescriptor source = loadSourceDescriptor(testName); |
52 | 52 | |
— | — | @@ -53,21 +53,8 @@ |
54 | 54 | T app = prepareApp(source, testName); |
55 | 55 | app.testLaunch(); |
56 | 56 | |
57 | | - //build order string |
58 | | - StringBuilder order = new StringBuilder(); |
59 | | - for (String by: orderBy) { |
60 | | - if (order.length()>0) order.append(", "); |
61 | | - order.append('"'); |
62 | | - order.append(by); |
63 | | - order.append('"'); |
64 | | - } |
65 | | - |
66 | | - //get real table name and build query |
67 | | - String tableName = app.getConfiguredDataset().getDbPrefix()+testName; |
68 | | - String sql = "SELECT * FROM \""+tableName+"\" ORDER BY "+order; |
69 | | - |
70 | 57 | //compare query result to expected data from XML file. |
71 | | - assertTableContent(testName, sql); |
| 58 | + assertTableData(getBaseName()+"-"+testName, app.getConfiguredDataset().getDbPrefix()+testName); |
72 | 59 | } |
73 | 60 | |
74 | 61 | } |
Index: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/BuildConceptAssociationsTest.java |
— | — | @@ -0,0 +1,20 @@ |
| 2 | +package de.brightbyte.wikiword.integrator; |
| 3 | + |
| 4 | + |
| 5 | +public class BuildConceptAssociationsTest extends IntegratorAppTestBase<BuildConceptAssociations> { |
| 6 | + |
| 7 | + public BuildConceptAssociationsTest() { |
| 8 | + super("BildConceptAssociations"); |
| 9 | + } |
| 10 | + |
| 11 | + //----------------------------------------------------------------------------------------------------- |
| 12 | + public void testTableImport() throws Exception { |
| 13 | + runApp("tableImport"); |
| 14 | + } |
| 15 | + |
| 16 | + @Override |
| 17 | + protected BuildConceptAssociations createApp() { |
| 18 | + return new BuildConceptAssociations(); |
| 19 | + } |
| 20 | + |
| 21 | +} |
Property changes on: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/BuildConceptAssociationsTest.java |
___________________________________________________________________ |
Name: svn:mergeinfo |
1 | 22 | + |
Index: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/LoadForeignPropertiesTest-tableImport.expected.data |
— | — | @@ -0,0 +1,13 @@ |
| 2 | +<?xml version='1.0' encoding='UTF-8'?> |
| 3 | +<dataset> |
| 4 | + <TEST_xx_tableImport external_authority="acme" external_id="FooBar" property="concept_name" value="FooBar" qualifier="dummy"/> |
| 5 | + <TEST_xx_tableImport external_authority="acme" external_id="FooBar" property="firstName" value="Bar" qualifier="dummy"/> |
| 6 | + <TEST_xx_tableImport external_authority="acme" external_id="FooBar" property="name" value="Foo" qualifier="dummy"/> |
| 7 | + <TEST_xx_tableImport external_authority="acme" external_id="FooBar" property="phone" value="12345" qualifier="dummy"/> |
| 8 | + |
| 9 | + <TEST_xx_tableImport external_authority="acme" external_id="XyzzyQuux" property="concept_name" value="XyzzyQuux" qualifier="dummy"/> |
| 10 | + <TEST_xx_tableImport external_authority="acme" external_id="XyzzyQuux" property="firstName" value="Quux" qualifier="dummy"/> |
| 11 | + <TEST_xx_tableImport external_authority="acme" external_id="XyzzyQuux" property="name" value="Xyzzy" qualifier="dummy"/> |
| 12 | + <TEST_xx_tableImport external_authority="acme" external_id="XyzzyQuux" property="phone" value="67890" qualifier="dummy"/> |
| 13 | +</dataset> |
| 14 | + |
Property changes on: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/LoadForeignPropertiesTest-tableImport.expected.data |
___________________________________________________________________ |
Name: svn:mergeinfo |
1 | 15 | + |