@Test public void test_diff_info_mergediff_for_root(){ ExampleDataA currentModel = new ExampleDataA(); ExampleDataB exampleFactoryB = new ExampleDataB(); currentModel.referenceAttribute.set(exampleFactoryB); currentModel=currentModel.internal().finalise(); currentModel=currentModel.internal().finalise(); ExampleDataA originalModel = currentModel.internal().copy(); ExampleDataA newModel = currentModel.internal().copy(); newModel.referenceAttribute.set(null); DataMerger<ExampleDataA>dataMerger = new DataMerger<>(currentModel, originalModel, newModel); MergeDiffInfo<ExampleDataA> mergeDiff= dataMerger.mergeIntoCurrent((permission)->true); Assertions.assertTrue(mergeDiff.hasNoConflicts()); }
public MergeDiffInfo<R> mergeIntoCurrent(Function<String,Boolean> permissionChecker) { return createMergeResult(permissionChecker).executeMerge(); }
DataMerger { public MergeDiffInfo<R> mergeIntoCurrent(Function<String,Boolean> permissionChecker) { return createMergeResult(permissionChecker).executeMerge(); } }
DataMerger { public MergeDiffInfo<R> mergeIntoCurrent(Function<String,Boolean> permissionChecker) { return createMergeResult(permissionChecker).executeMerge(); } DataMerger(R currentData, R commonData, R newData); }
DataMerger { public MergeDiffInfo<R> mergeIntoCurrent(Function<String,Boolean> permissionChecker) { return createMergeResult(permissionChecker).executeMerge(); } DataMerger(R currentData, R commonData, R newData); MergeResult<R> createMergeResult(Function<String,Boolean> permissionChecker); MergeDiffInfo<R> mergeIntoCurrent(Function<String,Boolean> permissionChecker); }
DataMerger { public MergeDiffInfo<R> mergeIntoCurrent(Function<String,Boolean> permissionChecker) { return createMergeResult(permissionChecker).executeMerge(); } DataMerger(R currentData, R commonData, R newData); MergeResult<R> createMergeResult(Function<String,Boolean> permissionChecker); MergeDiffInfo<R> mergeIntoCurrent(Function<String,Boolean> permissionChecker);  }