use of org.codehaus.plexus.util.cli.Commandline in project maven-scm by apache.
the class JazzUnEditCommandTest method testCreateUneditCommandWithEmptyFileSet.
public void testCreateUneditCommandWithEmptyFileSet() throws Exception {
ScmFileSet scmFileSet = new ScmFileSet(new File("."));
// An empty file set will be all files, which jazz will take as a "."
Commandline cmd = new JazzUnEditCommand().createUneditCommand(repo, scmFileSet).getCommandline();
String expected = "scm lock release --repository-uri https://localhost:9443/jazz --username myUserName --password myPassword .";
assertCommandLine(expected, scmFileSet.getBasedir(), cmd);
}
use of org.codehaus.plexus.util.cli.Commandline in project maven-scm by apache.
the class JazzUpdateCommandTest method testCreateAcceptCommand.
public void testCreateAcceptCommand() throws Exception {
Commandline cmd = new JazzUpdateCommand().createAcceptCommand(repo, getScmFileSet()).getCommandline();
String expected = "scm accept --repository-uri https://localhost:9443/jazz --username myUserName --password myPassword --flow-components";
assertCommandLine(expected, getWorkingDirectory(), cmd);
}
use of org.codehaus.plexus.util.cli.Commandline in project maven-scm by apache.
the class JazzEditCommandTest method testCreateEditCommandWithEmptyFileSet.
public void testCreateEditCommandWithEmptyFileSet() throws Exception {
ScmFileSet scmFileSet = new ScmFileSet(new File("."));
// An empty file set will be all files, which jazz will take as a "."
Commandline cmd = new JazzEditCommand().createEditCommand(repo, scmFileSet).getCommandline();
String expected = "scm lock acquire --repository-uri https://localhost:9443/jazz --username myUserName --password myPassword .";
assertCommandLine(expected, scmFileSet.getBasedir(), cmd);
}
use of org.codehaus.plexus.util.cli.Commandline in project maven-scm by apache.
the class JazzEditCommandTest method testCreateEditCommandWithSpecificFiles.
public void testCreateEditCommandWithSpecificFiles() throws Exception {
Commandline cmd = new JazzEditCommand().createEditCommand(repo, getScmFileSet()).getCommandline();
String expected = "scm lock acquire --repository-uri https://localhost:9443/jazz --username myUserName --password myPassword file1 file2";
assertCommandLine(expected, getWorkingDirectory(), cmd);
}
use of org.codehaus.plexus.util.cli.Commandline in project maven-scm by apache.
the class JazzCheckInCommandTest method testCreateCreateChangesetCommand.
public void testCreateCreateChangesetCommand() throws Exception {
JazzScmProviderRepository repo = getScmProviderRepository();
Commandline cmd = new JazzCheckInCommand().createCreateChangesetCommand(repo, getScmFileSet(), "This is my comment.").getCommandline();
String expected = "scm create changeset --username myUserName --password myPassword \"This is my comment.\"";
assertCommandLine(expected, getWorkingDirectory(), cmd);
}
Aggregations