use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceScmProviderTest method testParseConnectionWithHostPortAndUsername.
public void testParseConnectionWithHostPortAndUsername() throws Exception {
ScmRepository repo = makeScmRepository("scm:perforce:host:1234:username@//depot/projects/pathname");
PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
assertEquals("host", p4Repo.getHost());
assertEquals(1234, p4Repo.getPort());
assertEquals("username", p4Repo.getUser());
assertNull(p4Repo.getPassword());
assertEquals("//depot/projects/pathname", p4Repo.getPath());
}
use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceScmProviderTest method testParseConnectionWithHostAndUsername.
public void testParseConnectionWithHostAndUsername() throws Exception {
ScmRepository repo = makeScmRepository("scm:perforce:username@host://depot/projects/pathname");
PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
assertEquals("host", p4Repo.getHost());
assertEquals(0, p4Repo.getPort());
assertEquals("username", p4Repo.getUser());
assertNull(p4Repo.getPassword());
assertEquals("//depot/projects/pathname", p4Repo.getPath());
}
use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceScmProviderTest method testParseConnectionWithHost.
public void testParseConnectionWithHost() throws Exception {
ScmRepository repo = makeScmRepository("scm:perforce:host://depot/projects/pathname");
PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
assertEquals("host", p4Repo.getHost());
assertEquals(0, p4Repo.getPort());
assertNull(p4Repo.getUser());
assertNull(p4Repo.getPassword());
assertEquals("//depot/projects/pathname", p4Repo.getPath());
}
use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceChangeLogCommandTest method testCommandLineRevs.
private void testCommandLineRevs(String commandLine, ScmVersion version1, ScmVersion version2) throws Exception {
ScmRepository repository = getScmManager().makeScmRepository("scm:perforce://depot/projects/pathname");
PerforceScmProviderRepository repo = (PerforceScmProviderRepository) repository.getProviderRepository();
Commandline cl = PerforceChangeLogCommand.createCommandLine(repo, workingDirectory, System.getProperty(PerforceScmProvider.DEFAULT_CLIENTSPEC_PROPERTY), null, null, null, version1, version2);
assertCommandLine(commandLine, null, cl);
}
use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceUnEditCommandTest method testCommandLine.
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
private void testCommandLine(String scmUrl, String commandLine) throws Exception {
ScmRepository repository = getScmManager().makeScmRepository(scmUrl);
PerforceScmProviderRepository svnRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
ScmFileSet files = new ScmFileSet(new File("."), Arrays.asList(new File[] { new File("foo.xml"), new File("bar.xml") }));
Commandline cl = PerforceUnEditCommand.createCommandLine(svnRepository, workingDirectory, files);
assertCommandLine(commandLine, null, cl);
}
Aggregations