List of usage examples for org.eclipse.jgit.lib ObjectId name
public final String name()
name.
From source file:fr.brouillard.oss.jgitver.strategy.configurable.others.Scenario8WithLongFormatTest.java
License:Apache License
@Test public void version_of_C_commit() { ObjectId cCommit = scenario.getCommits().get("C"); // checkout the commit in scenario unchecked(() -> git.checkout().setName(cCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("1.0.0-1" + "-g" + cCommit.name().substring(0, 8))); }
From source file:fr.brouillard.oss.jgitver.strategy.configurable.others.Scenario8WithLongFormatTest.java
License:Apache License
@Test public void version_of_D_commit() { ObjectId dCommit = scenario.getCommits().get("D"); // checkout the commit in scenario unchecked(() -> git.checkout().setName(dCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("1.1.0-0" + "-g" + dCommit.name().substring(0, 8))); }
From source file:fr.brouillard.oss.jgitver.strategy.configurable.others.Scenario8WithLongFormatTest.java
License:Apache License
@Test public void version_of_E_commit() { ObjectId eCommit = scenario.getCommits().get("E"); // checkout the commit in scenario unchecked(() -> git.checkout().setName(eCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("1.1.0-1" + "-g" + eCommit.name().substring(0, 8))); }
From source file:fr.brouillard.oss.jgitver.strategy.configurable.others.Scenario8WithLongFormatTest.java
License:Apache License
@Test public void version_of_F_commit() { ObjectId fCommit = scenario.getCommits().get("F"); // checkout the commit in scenario unchecked(() -> git.checkout().setName(fCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("1.0.0-2" + "-g" + fCommit.name().substring(0, 8))); }
From source file:fr.brouillard.oss.jgitver.strategy.configurable.others.Scenario8WithoutGPrefixCommitTest.java
License:Apache License
@Test public void version_of_A_commit() { ObjectId firstCommit = scenario.getCommits().get("A"); // checkout the first commit in scenario unchecked(() -> git.checkout().setName(firstCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("0.0.0" + "-" + firstCommit.name().substring(0, 8))); }
From source file:fr.brouillard.oss.jgitver.strategy.configurable.others.Scenario8WithoutGPrefixCommitTest.java
License:Apache License
@Test public void version_of_C_commit() { ObjectId cCommit = scenario.getCommits().get("C"); // checkout the commit in scenario unchecked(() -> git.checkout().setName(cCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("1.0.1" + "-" + cCommit.name().substring(0, 8))); }
From source file:fr.brouillard.oss.jgitver.strategy.configurable.others.Scenario8WithoutGPrefixCommitTest.java
License:Apache License
@Test public void version_of_D_commit() { ObjectId dCommit = scenario.getCommits().get("D"); // checkout the commit in scenario unchecked(() -> git.checkout().setName(dCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("1.1.0")); }
From source file:fr.brouillard.oss.jgitver.strategy.configurable.others.Scenario8WithoutGPrefixCommitTest.java
License:Apache License
@Test public void version_of_E_commit() { ObjectId eCommit = scenario.getCommits().get("E"); // checkout the commit in scenario unchecked(() -> git.checkout().setName(eCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("1.1.0" + "-" + eCommit.name().substring(0, 8))); }
From source file:fr.brouillard.oss.jgitver.strategy.configurable.others.Scenario8WithoutGPrefixCommitTest.java
License:Apache License
@Test public void version_of_F_commit() { ObjectId fCommit = scenario.getCommits().get("F"); // checkout the commit in scenario unchecked(() -> git.checkout().setName(fCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("1.0.1" + "-" + fCommit.name().substring(0, 8))); }
From source file:fr.brouillard.oss.jgitver.strategy.maven.defaults.Scenario10WithDefaultsTest.java
License:Apache License
@Test public void version_of_A_commit() { ObjectId firstCommit = scenario.getCommits().get("A"); // checkout the first commit in scenario unchecked(() -> git.checkout().setName(firstCommit.name()).call()); assertThat(versionCalculator.getVersion(), is("0.0.0-SNAPSHOT")); }