use of org.eclipse.che.api.git.params.DiffParams in project che by eclipse.
the class DiffTest method testDiffRawWithCommits.
@Test(dataProvider = "GitConnectionFactory", dataProviderClass = org.eclipse.che.git.impl.GitConnectionFactoryProvider.class)
public void testDiffRawWithCommits(GitConnectionFactory connectionFactory) throws GitException, IOException {
//given
GitConnection connection = connectToInitializedGitRepository(connectionFactory, repository);
makeCommitInMaster(connection);
connection.add(AddParams.create(singletonList("aaa")));
connection.rm(RmParams.create(singletonList("README.txt")));
connection.commit(CommitParams.create("testDiffNameStatusWithCommits"));
//when
DiffParams params = DiffParams.create().withFileFilter(null).withType(DiffType.RAW).withNoRenames(false).withRenameLimit(0).withCommitA("HEAD^1").withCommitB("HEAD");
DiffPage diffPage = connection.diff(params);
//then
diffPage.writeTo(System.out);
}
use of org.eclipse.che.api.git.params.DiffParams in project che by eclipse.
the class DiffTest method testDiffRaw.
@Test(dataProvider = "GitConnectionFactory", dataProviderClass = org.eclipse.che.git.impl.GitConnectionFactoryProvider.class)
public void testDiffRaw(GitConnectionFactory connectionFactory) throws GitException, IOException {
//given
GitConnection connection = connectToInitializedGitRepository(connectionFactory, repository);
makeCommitInMaster(connection);
//when
DiffParams params = DiffParams.create().withFileFilter(null).withType(DiffType.RAW).withNoRenames(false).withRenameLimit(0);
DiffPage diffPage = connection.diff(params);
//then
diffPage.writeTo(System.out);
}
Aggregations