Revision 47436 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.dbf/src/test/java/org/gvsig/fmap/dal/store/dbf/TestCreate.java
TestCreate.java | ||
---|---|---|
318 | 318 |
|
319 | 319 |
|
320 | 320 |
public void testCreateWithDALFile() throws Exception { |
321 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
|
322 |
|
|
323 |
createFrom(sourceStore); |
|
324 |
|
|
325 |
checkTypes(sourceStore.getDefaultFeatureType(),true); |
|
326 |
copyFrom(sourceStore, FeatureStore.MODE_APPEND); |
|
327 |
checkData(sourceStore); |
|
328 |
|
|
329 |
createFrom(sourceStore); |
|
330 |
copyFrom(sourceStore, FeatureStore.MODE_FULLEDIT); |
|
331 |
checkData(sourceStore); |
|
321 |
try { |
|
322 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
|
332 | 323 |
|
324 |
createFrom(sourceStore); |
|
325 |
|
|
326 |
checkTypes(sourceStore.getDefaultFeatureType(),true); |
|
327 |
copyFrom(sourceStore, FeatureStore.MODE_APPEND); |
|
328 |
checkData(sourceStore); |
|
329 |
|
|
330 |
createFrom(sourceStore); |
|
331 |
copyFrom(sourceStore, FeatureStore.MODE_FULLEDIT); |
|
332 |
checkData(sourceStore); |
|
333 |
} catch (Throwable th) { |
|
334 |
th.printStackTrace(); |
|
335 |
throw th; |
|
336 |
} |
|
337 |
|
|
333 | 338 |
} |
334 | 339 |
|
335 | 340 |
public void testCreateWithoutDALFile() throws Exception { |
336 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
|
337 |
|
|
338 |
createFrom(sourceStore); |
|
339 |
TestUtils.removeDALFile(this.getTargetFilename()); |
|
340 |
|
|
341 |
checkTypes(sourceStore.getDefaultFeatureType(),false); |
|
342 |
copyFrom(sourceStore, FeatureStore.MODE_APPEND); |
|
343 |
TestUtils.removeDALFile(this.getTargetFilename()); |
|
344 |
checkData(sourceStore); |
|
345 |
|
|
346 |
createFrom(sourceStore); |
|
347 |
TestUtils.removeDALFile(this.getTargetFilename()); |
|
348 |
copyFrom(sourceStore, FeatureStore.MODE_FULLEDIT); |
|
349 |
TestUtils.removeDALFile(this.getTargetFilename()); |
|
350 |
checkData(sourceStore); |
|
341 |
try { |
|
342 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
|
351 | 343 |
|
344 |
createFrom(sourceStore); |
|
345 |
TestUtils.removeDALFile(this.getTargetFilename()); |
|
346 |
|
|
347 |
checkTypes(sourceStore.getDefaultFeatureType(),false); |
|
348 |
copyFrom(sourceStore, FeatureStore.MODE_APPEND); |
|
349 |
TestUtils.removeDALFile(this.getTargetFilename()); |
|
350 |
checkData(sourceStore); |
|
351 |
|
|
352 |
createFrom(sourceStore); |
|
353 |
TestUtils.removeDALFile(this.getTargetFilename()); |
|
354 |
copyFrom(sourceStore, FeatureStore.MODE_FULLEDIT); |
|
355 |
TestUtils.removeDALFile(this.getTargetFilename()); |
|
356 |
checkData(sourceStore); |
|
357 |
} catch (Throwable th) { |
|
358 |
th.printStackTrace(); |
|
359 |
throw th; |
|
360 |
} |
|
361 |
|
|
352 | 362 |
} |
353 | 363 |
} |
Also available in: Unified diff