Revision 605013a7
Added by Andreas Müller over 2 years ago
cdmlib-services/src/test/java/eu/etaxonomy/cdm/test/function/TestValidationManager.java | ||
---|---|---|
19 | 19 |
/** |
20 | 20 |
* @author a.mueller |
21 | 21 |
* @since 23.01.2015 |
22 |
* |
|
23 | 22 |
*/ |
24 | 23 |
public class TestValidationManager { |
25 | 24 |
|
... | ... | |
27 | 26 |
public void testMe(){ |
28 | 27 |
DbSchemaValidation schema = DbSchemaValidation.CREATE; |
29 | 28 |
|
30 |
|
|
31 | 29 |
String path = "C:\\Users\\a.mueller\\.cdmLibrary\\writableResources\\h2\\testValidation2"; |
32 | 30 |
String username = "sa"; |
33 | 31 |
CdmDataSource dataSource = CdmDataSource.NewH2EmbeddedInstance("validationTest", username, "", path); |
34 | 32 |
// dataSource = getMySQLDatasource(schema); |
35 | 33 |
|
36 |
|
|
37 | 34 |
//CdmPersistentDataSource.save(dataSource.getName(), dataSource); |
38 | 35 |
CdmApplicationController appCtr; |
39 | 36 |
appCtr = CdmApplicationController.NewInstance(dataSource,schema); |
... | ... | |
46 | 43 |
ref.setIsbn("1234"); |
47 | 44 |
appCtr.getReferenceService().save(ref); |
48 | 45 |
|
49 |
|
|
50 | 46 |
// insertSomeData(appCtr); |
51 | 47 |
// deleteHighLevelNode(appCtr); //->problem with Duplicate Key in Classification_TaxonNode |
52 | 48 |
|
53 | 49 |
appCtr.close(); |
54 |
|
|
55 |
|
|
56 | 50 |
} |
57 | 51 |
|
58 | 52 |
private CdmDataSource getMySQLDatasource (DbSchemaValidation schema){ |
... | ... | |
63 | 57 |
return dataSource; |
64 | 58 |
} |
65 | 59 |
|
66 |
/** |
|
67 |
* @param args |
|
68 |
*/ |
|
69 | 60 |
public static void main(String[] args) { |
70 | 61 |
TestValidationManager cc = new TestValidationManager(); |
71 | 62 |
cc.testMe(); |
Also available in: Unified diff
cleanup and renaming some functional test classes