Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: b456f9f3ecb07acbde278ac07c8872d453ba9e02 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
/*
 * Copyright (c) 2014, 2016 Eike Stepper (Berlin, Germany) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Alex Lagarde - initial API and implementation
 */
package org.eclipse.emf.cdo.tests.bugzilla;

import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.id.CDOIDUtil;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.common.revision.CDORevisionManager;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.internal.common.branch.CDOBranchVersionImpl;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
import org.eclipse.emf.cdo.tests.model1.Product1;
import org.eclipse.emf.cdo.tests.model1.VAT;
import org.eclipse.emf.cdo.tests.model6.BaseObject;
import org.eclipse.emf.cdo.tests.model6.ContainmentObject;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;

import java.util.LinkedList;
import java.util.List;

/**
 * Bug 400311 - CDOObject modifies Store even for Touch notifications.
 *
 * @author Alex Lagarde
 */
public class Bugzilla_400311b_Test extends AbstractCDOTest
{
  private CDOSession session;

  private CDOTransaction transaction;

  private OrderDetail orderDetail1;

  private OrderDetail orderDetail2;

  private Product1 product1;

  private Product1 product2;

  private ContainmentObject containmentObject;

  private BaseObject childObject;

  private int orderDetail1InitialVersion;

  private int product1InitialVersion;

  private int containmentObjectInitialVersion;

  private int childObjectInitialVersion;

  private CDOResource resource;

  @Override
  protected void doSetUp() throws Exception
  {
    super.doSetUp();
    session = openSession();
    transaction = session.openTransaction();

    orderDetail1 = getModel1Factory().createOrderDetail();
    orderDetail2 = getModel1Factory().createOrderDetail();
    product1 = getModel1Factory().createProduct1();
    product2 = getModel1Factory().createProduct1();
    orderDetail1.setProduct(product1);
    product1.getOrderDetails().add(orderDetail1);
    product1.getOrderDetails().add(orderDetail2);
    product1.setVat(VAT.VAT0);
    product1.getOtherVATs().add(VAT.VAT7);
    product1.getOtherVATs().add(VAT.VAT15);
    containmentObject = getModel6Factory().createContainmentObject();
    containmentObject.getAttributeList().add("attr1");
    containmentObject.getAttributeList().add("attr2");
    childObject = getModel6Factory().createBaseObject();
    containmentObject.getContainmentList().add(childObject);

    resource = transaction.createResource(getResourcePath("/test"));
    resource.getContents().add(orderDetail1);
    resource.getContents().add(orderDetail2);
    resource.getContents().add(product1);
    resource.getContents().add(product2);
    resource.getContents().add(containmentObject);

    transaction.commit();

    orderDetail1InitialVersion = CDOUtil.getCDOObject(orderDetail1).cdoRevision().getVersion();
    product1InitialVersion = CDOUtil.getCDOObject(product1).cdoRevision().getVersion();
    containmentObjectInitialVersion = CDOUtil.getCDOObject(containmentObject).cdoRevision().getVersion();
    childObjectInitialVersion = CDOUtil.getCDOObject(childObject).cdoRevision().getVersion();
  }

  @Override
  protected void doTearDown() throws Exception
  {
    // Check that the server never contains 2 adjacent identical revisions
    for (EObject element : resource.getContents())
    {
      CDOID elementID = CDOUtil.getCDOObject(element).cdoID();
      assertServerDoesNotContainIdenticalAdjacentRevision(elementID, transaction);
    }

    transaction.close();
    session.close();

    super.doTearDown();
  }

  public void testTouchModificationDoNotMakeObjectsDirtyOnSingleValuedReference() throws Exception
  {
    // Step 1: Make touch modification
    orderDetail1.setProduct(product1);
    assertVersion(orderDetail1InitialVersion, orderDetail1);

    // Step 2: Commit
    transaction.commit();
    assertVersion(orderDetail1InitialVersion, orderDetail1);

    // Step 3: make non touch modification
    orderDetail1.setProduct(null);
    assertDirty(orderDetail1, transaction);
    transaction.commit();
    assertVersionIncreased(orderDetail1InitialVersion, orderDetail1);
  }

  public void testTouchModificationDoNotMakeObjectsDirtyOnMultiValuedReference() throws Exception
  {
    // Step 1: Make touch modification
    product1.getOrderDetails().add(orderDetail1);
    assertVersion(product1InitialVersion, product1);

    // Step 2: Commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);

    // Step 3: make non touch modification
    product1.getOrderDetails().remove(orderDetail1);
    assertDirty(product1, transaction);
    transaction.commit();
    assertVersionIncreased(product1InitialVersion, product1);
  }

  public void testTouchModificationDoNotMakeObjectsDirtyOnMultiValuedReferenceMove() throws Exception
  {
    // Step 1: Make touch modification
    product1.getOrderDetails().move(0, orderDetail1);
    assertVersion(product1InitialVersion, product1);

    // Step 2: Commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);

    // Step 3: make non touch modification
    product1.getOrderDetails().remove(orderDetail1);
    assertDirty(product1, transaction);
    transaction.commit();
    assertVersionIncreased(product1InitialVersion, product1);
  }

  public void testTouchModificationDoNotMakeObjectsDirtyOnSingleValuedAttribute() throws Exception
  {
    // Step 1: Make touch modification
    product1.setName(product1.getName());
    assertVersion(product1InitialVersion, product1);

    // Step 2: Commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);

    // Step 3: make non touch modification
    product1.setName(product1.getName() + "-MODIFIED");
    assertDirty(product1, transaction);
    transaction.commit();
    assertVersionIncreased(product1InitialVersion, product1);
  }

  public void testTouchModificationDoNotMakeObjectsDirtyOnMultiValuedAttribute() throws Exception
  {
    // Step 1: Make touch modification
    containmentObject.getAttributeList().add("attr2");
    assertVersion(containmentObjectInitialVersion, containmentObject);

    // Step 2: Commit
    transaction.commit();
    assertVersion(containmentObjectInitialVersion, containmentObject);

    // Step 3: make non touch modification
    containmentObject.getAttributeList().remove("attr2");
    assertDirty(containmentObject, transaction);
    transaction.commit();
    assertVersionIncreased(containmentObjectInitialVersion, containmentObject);
  }

  public void testTouchModificationDoNotMakeObjectsDirtyOnMultiValuedAttributeMove() throws Exception
  {
    // Step 1: Make touch modification
    containmentObject.getAttributeList().move(1, "attr2");
    assertVersion(containmentObjectInitialVersion, containmentObject);

    // Step 2: Commit
    transaction.commit();
    assertVersion(containmentObjectInitialVersion, containmentObject);

    // Step 3: make non touch modification
    containmentObject.getAttributeList().move(0, "attr2");
    assertDirty(containmentObject, transaction);
    transaction.commit();
    assertVersionIncreased(containmentObjectInitialVersion, containmentObject);
  }

  public void testTouchModificationDoNotMakeObjectsDirtyOnSingleValuedEnum() throws Exception
  {
    // Step 1: Make touch modification
    product1.setVat(VAT.VAT0);
    assertVersion(product1InitialVersion, product1);

    // Step 2: Commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);

    // Step 3: make non touch modification
    product1.setVat(VAT.VAT7);
    assertDirty(product1, transaction);
    transaction.commit();
    assertVersionIncreased(product1InitialVersion, product1);
  }

  public void testTouchModificationDoNotMakeObjectsDirtyOnMultiValuedEnum() throws Exception
  {
    // Step 1: Make touch modification
    product1.getOtherVATs().add(VAT.VAT7);
    assertVersion(product1InitialVersion, product1);

    // Step 2: Commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);

    // Step 3: make non touch modification
    product1.getOtherVATs().remove(VAT.VAT7);
    assertDirty(product1, transaction);
    transaction.commit();
    assertVersionIncreased(product1InitialVersion, product1);
  }

  public void testTouchModificationDoNotMakeObjectsDirtyOnMultiValuedEnumMove() throws Exception
  {
    // Step 1: Make touch modification
    product1.getOtherVATs().move(0, VAT.VAT7);
    assertVersion(product1InitialVersion, product1);

    // Step 2: Commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);

    // Step 3: make non touch modification
    product1.getOtherVATs().move(1, VAT.VAT7);
    assertDirty(product1, transaction);
    transaction.commit();
    assertVersionIncreased(product1InitialVersion, product1);
  }

  public void testUndoRevertsToCleanStateOnSingleValuedReference() throws Exception
  {
    // Step 1: make modification
    orderDetail1.setProduct(product2);
    assertDirty(orderDetail1, transaction);

    // Step 2: get back to initial clean state
    product1.getOrderDetails().add(0, orderDetail1);
    assertVersion(orderDetail1InitialVersion, orderDetail1);

    // Step 3: commit
    transaction.commit();
    assertVersion(orderDetail1InitialVersion, orderDetail1);
  }

  public void testUndoRevertsToCleanStateOnMultiValuedReference() throws Exception
  {
    // Step 1: make modification
    product1.getOrderDetails().remove(orderDetail1);
    assertDirty(product1, transaction);

    // Step 2: get back to initial clean state
    product1.getOrderDetails().add(0, orderDetail1);
    assertVersion(product1InitialVersion, product1);

    // Step 3: commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);
  }

  public void testUndoRevertsToCleanStateOnMultiValuedReferenceMove() throws Exception
  {
    // Step 1: make modification
    int oldIndex = product1.getOrderDetails().indexOf(orderDetail1);
    product1.getOrderDetails().move(1, orderDetail1);
    assertDirty(product1, transaction);

    // Step 2: get back to initial clean state
    product1.getOrderDetails().move(oldIndex, orderDetail1);
    assertVersion(product1InitialVersion, product1);

    // Step 3: commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);
  }

  public void testUndoRevertsToCleanStateOnSingleValuedAttribute() throws Exception
  {
    // Step 1: make modification
    String initialValue = product1.getName();
    product1.setName("New name");
    assertDirty(product1, transaction);

    // Step 2: get back to initial clean state
    product1.setName(initialValue);
    assertVersion(product1InitialVersion, product1);

    // Step 3: commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);
  }

  public void testUndoRevertsToCleanStateOnMultiValuedAttribute() throws Exception
  {
    // Step 1: make modification
    containmentObject.getAttributeList().add("attr3");
    assertDirty(containmentObject, transaction);

    // Step 2: get back to initial clean state
    containmentObject.getAttributeList().remove("attr3");
    assertVersion(containmentObjectInitialVersion, containmentObject);

    // Step 3: commit
    transaction.commit();
    assertVersion(containmentObjectInitialVersion, containmentObject);
  }

  public void testUndoRevertsToCleanStateOnMultiValuedAttributeMove() throws Exception
  {
    // Step 1: make modification
    int oldIndex = containmentObject.getAttributeList().indexOf("attr2");
    containmentObject.getAttributeList().move(0, "attr2");
    assertDirty(containmentObject, transaction);

    // Step 2: get back to initial clean state
    containmentObject.getAttributeList().move(oldIndex, "attr2");
    assertVersion(containmentObjectInitialVersion, containmentObject);

    // Step 3: commit
    transaction.commit();
    assertVersion(containmentObjectInitialVersion, containmentObject);
  }

  public void testUndoRevertsToCleanStateOnSingleValuedEnum() throws Exception
  {
    // Step 1: make modification
    product1.setVat(VAT.VAT7);
    assertDirty(product1, transaction);

    // Step 2: get back to initial clean state
    product1.setVat(VAT.VAT0);
    assertVersion(product1InitialVersion, product1);

    // Step 3: commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);
  }

  public void testUndoRevertsToCleanStateOnMultiValuedEnum() throws Exception
  {
    // Step 1: make modification
    product1.getOtherVATs().add(VAT.VAT0);
    assertDirty(product1, transaction);

    // Step 2: get back to initial clean state
    product1.getOtherVATs().remove(VAT.VAT0);
    assertVersion(product1InitialVersion, product1);

    // Step 3: commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);
  }

  public void testUndoRevertsToCleanStateOnMultiValuedEnumMove() throws Exception
  {
    // Step 1: make modification
    int oldIndex = product1.getOtherVATs().indexOf(VAT.VAT7);
    product1.getOtherVATs().move(1, VAT.VAT7);
    assertDirty(product1, transaction);

    // Step 2: get back to initial clean state
    product1.getOtherVATs().move(oldIndex, VAT.VAT7);
    assertVersion(product1InitialVersion, product1);

    // Step 3: commit
    transaction.commit();
    assertVersion(product1InitialVersion, product1);
  }

  public void testUndoRevertsToCleanStateOnObjectCreation() throws Exception
  {
    EList<BaseObject> containmentList = containmentObject.getContainmentList();

    // Step 1: create a new object
    BaseObject newObject = getModel6Factory().createBaseObject();
    containmentList.add(newObject);
    assertDirty(containmentObject, transaction);

    // Step 2: delete the created object
    containmentList.remove(newObject);
    assertVersion(containmentObjectInitialVersion, containmentObject);

    // Step 3: commit
    transaction.commit();
    assertVersion(containmentObjectInitialVersion, containmentObject);
  }

  /**
   * CDOLegacyAdapter creates (bogus?) CONTAINER deltas that aren't detected.
   */
  @Skips(IModelConfig.CAPABILITY_LEGACY)
  public void testUndoRevertsToCleanStateOnObjectDeletion() throws Exception
  {
    CDOID elementToDeleteID = CDOUtil.getCDOObject(childObject).cdoID();
    EList<BaseObject> containmentList = containmentObject.getContainmentList();

    // For better debugging:
    // Map<InternalCDOObject, InternalCDORevision> cleanRevisions = ((InternalCDOTransaction)transaction)
    // .getCleanRevisions();
    // CDOSavepoint savepoint = transaction.getLastSavepoint();
    // Collection<CDORevisionDelta> revisionDeltas = savepoint.getRevisionDeltas2().values();

    // Step 1: delete object
    containmentList.remove(childObject);
    assertDirty(containmentObject, transaction);
    assertEquals("Element should be detached", true, transaction.getDetachedObjects().containsKey(elementToDeleteID));

    // Step 2: undo deletion
    containmentList.add(childObject);
    assertVersion(containmentObjectInitialVersion, containmentObject);
    assertVersion(childObjectInitialVersion, childObject);
    assertEquals("Element should not be detached", false, transaction.getDetachedObjects().containsKey(elementToDeleteID));

    // Step 3: commit
    transaction.commit();
    assertVersion(containmentObjectInitialVersion, containmentObject);
    assertVersion(childObjectInitialVersion, childObject);
  }

  /**
   * CDOLegacyAdapter creates (bogus?) CONTAINER deltas that aren't detected.
   */
  @Skips(IModelConfig.CAPABILITY_LEGACY)
  public void testUndoRevertsToCleanStateOnComplexModifications() throws Exception
  {
    String oldContainmentObjectAttributeValue = containmentObject.getAttributeOptional();
    CDOID elementToDeleteID = CDOUtil.getCDOObject(childObject).cdoID();
    EList<BaseObject> containmentList = containmentObject.getContainmentList();

    // Step 1: make several modifications (modifying several features on the same object and several objects)
    containmentList.remove(childObject);
    BaseObject newObject = getModel6Factory().createBaseObject();
    containmentList.add(newObject);
    containmentObject.setAttributeOptional("MODIFIED");

    String oldProduct1Name = product1.getName();
    product1.setName("New name");
    int oldVATIndexForProduct1 = product1.getOtherVATs().indexOf(VAT.VAT7);
    product1.getOtherVATs().move(1, VAT.VAT7);

    orderDetail1.setProduct(product2);

    // Check that all modified objects are dirty/detached
    assertDirty(containmentObject, transaction);
    assertDirty(product1, transaction);
    assertDirty(orderDetail1, transaction);
    assertEquals("Element should be detached", true, transaction.getDetachedObjects().containsKey(elementToDeleteID));

    // Step 2: get back to initial clean state step by step
    product1.getOrderDetails().add(0, orderDetail1);
    assertVersion(orderDetail1InitialVersion, orderDetail1, true);

    product1.getOtherVATs().move(oldVATIndexForProduct1, VAT.VAT7);
    assertDirty(product1, transaction);

    product1.setName(oldProduct1Name);
    assertVersion(product1InitialVersion, product1, true);

    containmentList.add(childObject);
    assertDirty(containmentObject, transaction);

    containmentList.remove(newObject);
    assertDirty(containmentObject, transaction);

    containmentObject.setAttributeOptional(oldContainmentObjectAttributeValue);
    assertVersion(containmentObjectInitialVersion, containmentObject);

    // Step 3: commit
    transaction.commit();
    assertVersion(orderDetail1InitialVersion, orderDetail1);
    assertVersion(product1InitialVersion, product1);
    assertVersion(containmentObjectInitialVersion, containmentObject);
  }

  /**
   * Ensures that the given object is clean and that its version was not increased compared to the given initial version.
   * @param initalVersion the initial version of the object before it was modified
   * @param element the EObject to test
   */
  private void assertVersion(int expectedVersion, EObject element)
  {
    assertVersion(expectedVersion, element, false);
  }

  private void assertVersion(int expectedVersion, EObject element, boolean expectedDirtyTransaction)
  {
    CDOObject cdoElement = CDOUtil.getCDOObject(element);
    assertClean(cdoElement, ((CDOResource)cdoElement.eResource()).cdoView());
    assertEquals(expectedVersion, cdoElement.cdoRevision().getVersion());
    assertEquals("Transaction is not expected to contain revision deltas on the given object", null, transaction.getRevisionDeltas().get(cdoElement.cdoID()));

    if (expectedDirtyTransaction)
    {
      assertNotSame("Transaction is expected to contain revision deltas", CDOIDUtil.createMap(), transaction.getRevisionDeltas());
    }
    else
    {
      assertEquals("Transaction is not expected to contain revision deltas", CDOIDUtil.createMap(), transaction.getRevisionDeltas());
    }

    assertEquals("Transaction is expected to be " + (expectedDirtyTransaction ? "dirty" : "clean"), expectedDirtyTransaction, transaction.isDirty());
  }

  /**
   * Ensures that the given object is dirty and that its version was increased compared to the given initial version.
   * @param initalVersion the initial version of the object before it was modified
   * @param element the EObject to test
   */
  private static void assertVersionIncreased(int initialVersion, EObject element)
  {
    CDOObject cdoElement = CDOUtil.getCDOObject(element);
    assertEquals(initialVersion + 1, cdoElement.cdoRevision().getVersion());
  }

  /**
   * Ensures that the CDOServer does not contain 2 identical Adjacent revisions.
   */
  private static void assertServerDoesNotContainIdenticalAdjacentRevision(CDOID targetElement, CDOTransaction transaction)
  {
    // Step 1: get all revisions for the given ID through the revision manager
    CDORevisionManager revisionManager = transaction.getSession().getRevisionManager();
    int initialChunkSize = transaction.getSession().options().getCollectionLoadingPolicy().getInitialChunkSize();

    int version = CDOBranchVersion.FIRST_VERSION;
    List<CDORevision> revisions = new LinkedList<CDORevision>();

    boolean noMoreRevisionsAvailable = false;
    while (!noMoreRevisionsAvailable)
    {
      CDOBranchVersion branchVersion = new CDOBranchVersionImpl(transaction.getBranch(), version);
      if (revisionManager.containsRevisionByVersion(targetElement, branchVersion))
      {
        CDORevision fetched = revisionManager.getRevisionByVersion(targetElement, branchVersion, initialChunkSize, true);
        if (fetched != null)
        {
          revisions.add(fetched);
        }
      }
      else
      {
        noMoreRevisionsAvailable = true;
      }

      version++;
    }

    // Step 2: compare all adjacent revisions and check that there are different
    if (revisions.size() > 1)
    {
      for (int i = 0; i < revisions.size() - 1; i++)
      {
        CDORevision rev1 = revisions.get(i);
        CDORevision rev2 = revisions.get(i + 1);
        CDORevisionDelta rDelta = rev1.compare(rev2);
        if (rDelta.getFeatureDeltas().size() == 0)
        {
          // The revision delta contains no feature deltas
          // this means the revisions are identical
          fail("2 Adjacent Revisions should never be equals.");
        }
      }
    }
  }
}

Back to the top