@Test public void VersionNode_Should_Analyze_Actual_Changeset() { SimpleVersion v1 = new Builder() .changeset(ImmutableMap.of("id", "id1", "name", "name1")) .build(); SimpleVersion v2 = new Builder() .changeset(ImmutableMap.of("id", "id2", "name", "name1")) .parents(v1.revision) .build(); SimpleVersion v3 = new Builder() .changeset(ImmutableMap.of("id", "id1", "name", "name2")) .parents(v1.revision) .build(); SimpleVersionGraph versionGraph = init(asList(v1, v2, v3)); VersionNode versionNode = versionGraph.getVersionNode(v2.revision); assertThat(versionNode.getChangeset()).isEqualTo(ImmutableMap.of("id", "id2")); Version<String, String, String> version = versionNode.getVersion(); assertThat(version).isNotSameAs(v2); assertThat(version.revision).isEqualTo(v2.revision); assertThat(version.type).isEqualTo(v2.type); assertThat(version.branch).isEqualTo(v2.branch); assertThat(version.parentRevisions).isEqualTo(v2.parentRevisions); assertThat(version.meta).isEqualTo(v2.meta); assertThat(version.changeset).isEqualTo(ImmutableMap.of("id", "id2")); versionNode = versionGraph.getVersionNode(v3.revision); assertThat(versionNode.getChangeset()).isEqualTo(ImmutableMap.of("name", "name2")); Merge<String, String, String> merge = versionGraph.mergeBranches(DEFAULT_BRANCH); assertThat(merge.getConflicts().isEmpty()).isTrue(); assertThat(merge.getProperties()).isEqualTo(ImmutableMap.of("id", "id2", "name", "name2")); }
public static SimpleVersionGraph init() { return new SimpleVersionGraph(); }
SimpleVersionGraph extends AbstractVersionGraph<String, String, String, SimpleVersionGraph, SimpleVersionGraph.Builder> { public static SimpleVersionGraph init() { return new SimpleVersionGraph(); } }
SimpleVersionGraph extends AbstractVersionGraph<String, String, String, SimpleVersionGraph, SimpleVersionGraph.Builder> { public static SimpleVersionGraph init() { return new SimpleVersionGraph(); } private  SimpleVersionGraph(); private  SimpleVersionGraph(Builder builder); }
SimpleVersionGraph extends AbstractVersionGraph<String, String, String, SimpleVersionGraph, SimpleVersionGraph.Builder> { public static SimpleVersionGraph init() { return new SimpleVersionGraph(); } private  SimpleVersionGraph(); private  SimpleVersionGraph(Builder builder); static SimpleVersionGraph init(); static SimpleVersionGraph init(Version<String, String, String>... versions); static SimpleVersionGraph init(Iterable<? extends Version<String, String, String>> versions); }
SimpleVersionGraph extends AbstractVersionGraph<String, String, String, SimpleVersionGraph, SimpleVersionGraph.Builder> { public static SimpleVersionGraph init() { return new SimpleVersionGraph(); } private  SimpleVersionGraph(); private  SimpleVersionGraph(Builder builder); static SimpleVersionGraph init(); static SimpleVersionGraph init(Version<String, String, String>... versions); static SimpleVersionGraph init(Iterable<? extends Version<String, String, String>> versions);  }