Revision 8165133b
Added by Andreas Müller almost 7 years ago
cdmlib-services/src/test/java/eu/etaxonomy/cdm/test/function/TestModelUpdate.java | ||
---|---|---|
34 | 34 |
|
35 | 35 |
|
36 | 36 |
private void testSelectedDb(){ |
37 |
DbSchemaValidation schema = DbSchemaValidation.VALIDATE;
|
|
37 |
DbSchemaValidation schema = DbSchemaValidation.CREATE;
|
|
38 | 38 |
|
39 |
DatabaseTypeEnum dbType = DatabaseTypeEnum.H2;
|
|
39 |
DatabaseTypeEnum dbType = DatabaseTypeEnum.MySQL;
|
|
40 | 40 |
|
41 | 41 |
|
42 | 42 |
String database = (schema == DbSchemaValidation.VALIDATE ? "cdm36" : "cdm40"); |
... | ... | |
52 | 52 |
} catch (Exception e) { |
53 | 53 |
e.printStackTrace(); |
54 | 54 |
} |
55 |
try{ |
|
56 |
CdmApplicationController appCtr = CdmApplicationController.NewInstance(dataSource,schema); |
|
55 | 57 |
|
56 |
CdmApplicationController appCtr = CdmApplicationController.NewInstance(dataSource,schema); |
|
58 |
// Classification classification = Classification.NewInstance("Me"); |
|
59 |
// Taxon taxon = Taxon.NewInstance(null, null); |
|
60 |
// Person person = Person.NewInstance(); |
|
61 |
// TaxonNode node = classification.addChildTaxon(taxon, null, null); |
|
62 |
// DefinedTerm lastScrutiny = (DefinedTerm)appCtr.getTermService().find(DefinedTerm.uuidLastScrutiny); |
|
63 |
// TaxonNodeAgentRelation rel = node.addAgentRelation(lastScrutiny, person); |
|
64 |
// appCtr.getClassificationService().save(classification); |
|
57 | 65 |
|
58 |
// Classification classification = Classification.NewInstance("Me"); |
|
59 |
// Taxon taxon = Taxon.NewInstance(null, null); |
|
60 |
// Person person = Person.NewInstance(); |
|
61 |
// TaxonNode node = classification.addChildTaxon(taxon, null, null); |
|
62 |
// DefinedTerm lastScrutiny = (DefinedTerm)appCtr.getTermService().find(DefinedTerm.uuidLastScrutiny); |
|
63 |
// TaxonNodeAgentRelation rel = node.addAgentRelation(lastScrutiny, person); |
|
64 |
// appCtr.getClassificationService().save(classification); |
|
66 |
// appCtr.getCommonService().createFullSampleData(); |
|
65 | 67 |
|
66 |
// appCtr.getCommonService().createFullSampleData(); |
|
67 | 68 |
|
68 | 69 |
|
69 |
|
|
70 |
appCtr.close(); |
|
70 |
appCtr.close(); |
|
71 |
}catch (Exception e) { |
|
72 |
e.printStackTrace(); |
|
73 |
} |
|
71 | 74 |
System.exit(0); |
72 | 75 |
} |
73 | 76 |
|
... | ... | |
114 | 117 |
*/ |
115 | 118 |
@SuppressWarnings("unused") //enable only if needed |
116 | 119 |
private void updateRemoteWebappTestH2(){ |
117 |
String path = "C:\\Users\\a.mueller\\eclipse\\svn\\cdmlib-trunk\\cdmlib\\cdmlib-remote-webapp\\src\\test\\resources\\h2"; |
|
120 |
String pathToCdmlib = "C:\\Users\\a.mueller\\eclipse\\git\\cdmlib\\"; |
|
121 |
|
|
122 |
String pathInCdmlib = "cdmlib-remote-webapp\\src\\test\\resources\\h2"; |
|
123 |
String path = pathToCdmlib + pathInCdmlib; |
|
118 | 124 |
ICdmDataSource dataSource = CdmDataSource.NewH2EmbeddedInstance("cdmTest", "sa", "", path, NomenclaturalCode.ICNAFP); |
119 | 125 |
|
120 | 126 |
|
Also available in: Unified diff
minor