Search in sources :

Example 1 with JGitConnectionFactory

use of org.eclipse.che.git.impl.jgit.JGitConnectionFactory in project che by eclipse.

the class GitConnectionFactoryProvider method createConnection.

@DataProvider(name = "GitConnectionFactory")
public static Object[][] createConnection() throws ServerException, NotFoundException {
    GitUserResolver resolver = mock(GitUserResolver.class);
    when(resolver.getUser()).thenReturn(GitTestUtil.getTestGitUser());
    return new Object[][] { new Object[] { new JGitConnectionFactory(mock(CredentialsLoader.class), mock(SshKeyProvider.class), resolver) } };
}
Also used : JGitConnectionFactory(org.eclipse.che.git.impl.jgit.JGitConnectionFactory) CredentialsLoader(org.eclipse.che.api.git.CredentialsLoader) SshKeyProvider(org.eclipse.che.plugin.ssh.key.script.SshKeyProvider) GitUserResolver(org.eclipse.che.api.git.GitUserResolver) DataProvider(org.testng.annotations.DataProvider)

Aggregations

CredentialsLoader (org.eclipse.che.api.git.CredentialsLoader)1 GitUserResolver (org.eclipse.che.api.git.GitUserResolver)1 JGitConnectionFactory (org.eclipse.che.git.impl.jgit.JGitConnectionFactory)1 SshKeyProvider (org.eclipse.che.plugin.ssh.key.script.SshKeyProvider)1 DataProvider (org.testng.annotations.DataProvider)1