Revision 3391
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test13Merge.java | ||
---|---|---|
106 | 106 |
|
107 | 107 |
private void checkLocalChange(FeatureStore data, FeatureStore changes, String code, int operation, int id, String text) throws DataException{ |
108 | 108 |
Feature change = changes.findFirst("WSCH_FEATURECODE = '"+code+"'"); |
109 |
assertNotNull("Change code not exists", change); |
|
109 | 110 |
assertEquals(operation, change.getInt(WorkspaceChangesTable.OPERATION)); |
110 | 111 |
// Uf, ojo con operation delete, no tiene data. en la primera pasada lo saltaria, y a ver que pasa con |
111 | 112 |
// los inserts y updates. |
... | ... | |
227 | 228 |
check(features, 5, 8, "HHH"); |
228 | 229 |
|
229 | 230 |
FeatureStore changes = ws2.getFeatureStore(WorkspaceChangesTable.TABLE_NAME); |
230 |
checkLocalChange(store2, changes, "00000000000068abcdef0123456789", OP_INSERT, 8, "HHH");
|
|
231 |
checkLocalChange(store2, changes, "00000000000066abcdef0123456789", OP_INSERT, 8, "HHH");
|
|
231 | 232 |
checkLocalChange(store2, changes, "00000000000008abcdef0123456789", OP_UPDATE, 2, "BBB"); |
232 |
checkLocalChange(store2, changes, "00000000000071abcdef0123456789", OP_INSERT, 5, "EEE");
|
|
233 |
checkLocalChange(store2, changes, "00000000000037abcdef0123456789", OP_DELETE, 7, "GGG");
|
|
233 |
checkLocalChange(store2, changes, "00000000000069abcdef0123456789", OP_INSERT, 5, "EEE");
|
|
234 |
checkLocalChange(store2, changes, "00000000000035abcdef0123456789", OP_DELETE, 7, "GGG");
|
|
234 | 235 |
|
235 | 236 |
r = ws2.commit(); |
236 | 237 |
assertEquals("ws2.commit-1 status", ERR_NO_ERROR, r); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test14UpdateWithConflict.java | ||
---|---|---|
464 | 464 |
assertEquals("ws2.update-1 status", ERR_NO_ERROR, r); |
465 | 465 |
|
466 | 466 |
FeatureStore changes = ws2.getFeatureStore(WorkspaceChangesTable.TABLE_NAME); |
467 |
checkLocalChange(store2, changes, "00000000000041abcdef0123456789", OP_INSERT, 4, "DD2", STATE_CONFLICT);
|
|
467 |
checkLocalChange(store2, changes, "00000000000037abcdef0123456789", OP_INSERT, 4, "DD2", STATE_CONFLICT);
|
|
468 | 468 |
|
469 | 469 |
|
470 | 470 |
// Actualizamos (update) la tabla "test" en el workspace2 |
... | ... | |
560 | 560 |
FeatureStore changes = ws2.getFeatureStore(WorkspaceChangesTable.TABLE_NAME); |
561 | 561 |
assertEquals("ws2-changes size", 2, changes.size64()); |
562 | 562 |
|
563 |
checkLocalChange(store2, changes, "00000000000033abcdef0123456789", OP_DELETE, 4, "DD1", -1);
|
|
563 |
checkLocalChange(store2, changes, "00000000000029abcdef0123456789", OP_DELETE, 4, "DD1", -1);
|
|
564 | 564 |
|
565 |
checkLocalChange(store2, changes, "00000000000041abcdef0123456789", OP_INSERT, 4, "DD2", -1);
|
|
565 |
checkLocalChange(store2, changes, "00000000000037abcdef0123456789", OP_INSERT, 4, "DD2", -1);
|
|
566 | 566 |
|
567 | 567 |
} |
568 | 568 |
|
Also available in: Unified diff