@Test public void shouldSynchronize_shouldReturnFalseIfCreateAndObjectsAreNotNull() { SimpleObject oldObject = SimpleObjectMother.createInstance(TEST_UUID, TEST_VALUE); SimpleObject newObject = SimpleObjectMother.createInstance(TEST_UUID, TEST_VALUE_2); Assert.assertFalse(abstractSynchronizationService.shouldSynchronize(oldObject, newObject, SyncConstants.ACTION_CREATED)); }
protected boolean shouldSynchronize(SimpleObject oldObject, SimpleObject newObject, String action) { if (isWrongDeleteAction(newObject, action) || isWrongUpdateAction(oldObject, action) || isWrongCreateAction(oldObject, newObject, action) || isUpdateOnVoidedObject(oldObject, action)) { return false; } return oldObject == null || newObject == null || areDifferentObjects(oldObject, newObject); }
AbstractSynchronizationService { protected boolean shouldSynchronize(SimpleObject oldObject, SimpleObject newObject, String action) { if (isWrongDeleteAction(newObject, action) || isWrongUpdateAction(oldObject, action) || isWrongCreateAction(oldObject, newObject, action) || isUpdateOnVoidedObject(oldObject, action)) { return false; } return oldObject == null || newObject == null || areDifferentObjects(oldObject, newObject); } }
AbstractSynchronizationService { protected boolean shouldSynchronize(SimpleObject oldObject, SimpleObject newObject, String action) { if (isWrongDeleteAction(newObject, action) || isWrongUpdateAction(oldObject, action) || isWrongCreateAction(oldObject, newObject, action) || isUpdateOnVoidedObject(oldObject, action)) { return false; } return oldObject == null || newObject == null || areDifferentObjects(oldObject, newObject); }  }
AbstractSynchronizationService { protected boolean shouldSynchronize(SimpleObject oldObject, SimpleObject newObject, String action) { if (isWrongDeleteAction(newObject, action) || isWrongUpdateAction(oldObject, action) || isWrongCreateAction(oldObject, newObject, action) || isUpdateOnVoidedObject(oldObject, action)) { return false; } return oldObject == null || newObject == null || areDifferentObjects(oldObject, newObject); }   }
AbstractSynchronizationService { protected boolean shouldSynchronize(SimpleObject oldObject, SimpleObject newObject, String action) { if (isWrongDeleteAction(newObject, action) || isWrongUpdateAction(oldObject, action) || isWrongCreateAction(oldObject, newObject, action) || isUpdateOnVoidedObject(oldObject, action)) { return false; } return oldObject == null || newObject == null || areDifferentObjects(oldObject, newObject); }    }