@Test public void version_order_is_maintained() { SimpleVersion v1 = new Builder() .changeset(ImmutableMap.of("key", "value1")) .build(); SimpleVersion v2 = new Builder() .changeset(ImmutableMap.of("key", "value2")) .build(); assertThat(v1.revision).isLessThan(v2.revision); SimpleVersionGraph versionGraph = init(asList(v2, v1)); Merge<String, String, String> merge = versionGraph.mergeBranches(DEFAULT_BRANCH); assertThat(merge.getProperties().get("key")).isEqualTo("value2"); assertThat(versionGraph.getTip().revision).isEqualTo(v1.revision); }
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);  }