Revision 2807
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/TestUtils.java | ||
---|---|---|
148 | 148 |
return store; |
149 | 149 |
} |
150 | 150 |
|
151 |
public static void h2sql_repository(JDBCServerExplorer server) { |
|
152 |
File srvfile = ((HasAFile)server.getParameters()).getFile(); |
|
153 |
System.out.println("\ncd '"+srvfile.getParent()+"'; h2sql -d '"+srvfile.getName()+"' -user SA\n"); |
|
151 |
public static void h2sql(String label, File file) { |
|
152 |
System.out.println(""); |
|
153 |
System.out.println("#h2console "+label+": "+file.getName()); |
|
154 |
System.out.println("cd '"+file.getParent()+"'; h2sql -d '"+file.getName()+"' -user SA"); |
|
155 |
System.out.println("jdbc:h2:"+file.getAbsolutePath()+";MODE=PostgreSQL;SCHEMA=PUBLIC;ALLOW_LITERALS=ALL"); |
|
156 |
System.out.println("jdbc:h2:tcp://127.0.1.1:9123/"+file.getAbsolutePath()+";MODE=PostgreSQL;SCHEMA=PUBLIC;ALLOW_LITERALS=ALL"); |
|
157 |
System.out.println(""); |
|
154 | 158 |
} |
155 | 159 |
|
160 |
public static void h2sql_repository(File srvfile) { |
|
161 |
h2sql("repo", srvfile); |
|
162 |
} |
|
163 |
|
|
156 | 164 |
public static void h2sql_repository(JDBCServerExplorerParameters server) { |
157 | 165 |
File srvfile = ((HasAFile)server).getFile(); |
158 |
System.out.println("\ncd '"+srvfile.getParent()+"'; h2sql -d '"+srvfile.getName()+"' -user SA\n");
|
|
166 |
h2sql_repository(srvfile);
|
|
159 | 167 |
} |
160 | 168 |
|
169 |
public static void h2sql_repository(JDBCServerExplorer server) { |
|
170 |
JDBCServerExplorerParameters parameters = server.getParameters(); |
|
171 |
h2sql_repository(parameters); |
|
172 |
} |
|
173 |
|
|
161 | 174 |
public static void h2sql_repository(VCSGisRepository repo) { |
162 | 175 |
JDBCServerExplorer server = ((VCSGisRepositoryLocaldb)repo).getServerExplorer(); |
163 |
File srvfile = ((HasAFile)server.getParameters()).getFile(); |
|
164 |
System.out.println("\ncd '"+srvfile.getParent()+"'; h2sql -d '"+srvfile.getName()+"' -user SA\n"); |
|
176 |
h2sql_repository(server); |
|
165 | 177 |
} |
166 | 178 |
|
167 | 179 |
public static void h2sql_workspace(VCSGisWorkspace ws) { |
168 | 180 |
JDBCServerExplorerParameters params = ws.getExplorerParameters(); |
169 | 181 |
File wsfile = ((HasAFile)params).getFile(); |
170 |
System.out.println("\ncd '"+wsfile.getParent()+"'; h2sql -d '"+wsfile.getName()+"' -user SA\n");
|
|
182 |
h2sql_workspace(wsfile);
|
|
171 | 183 |
} |
172 | 184 |
|
173 | 185 |
public static void h2sql_workspace(File wsfile) { |
174 |
System.out.println("\ncd '"+wsfile.getParent()+"'; h2sql -d '"+wsfile.getName()+"' -user SA\n");
|
|
186 |
h2sql("ws", wsfile);
|
|
175 | 187 |
} |
176 | 188 |
|
177 | 189 |
public static Map<String,String> getExpecteds(String name) throws Exception { |
Also available in: Unified diff