use of org.apache.maven.scm.provider.git.gitexe.command.remove.GitRemoveConsumer in project maven-scm by apache.
the class GitRemoveConsumerTest method testLog1Consumer.
public void testLog1Consumer() throws Exception {
GitRemoveConsumer consumer = new GitRemoveConsumer(new DefaultLog());
File f = getTestFile("/src/test/resources/git/remove/gitrm.gitlog");
BufferedReader r = new BufferedReader(new FileReader(f));
String line;
while ((line = r.readLine()) != null) {
consumer.consumeLine(line);
}
List<ScmFile> changedFiles = consumer.getRemovedFiles();
assertEquals(2, changedFiles.size());
testScmFile((ScmFile) changedFiles.get(0), "src/main/java/Application.java", ScmFileStatus.DELETED);
testScmFile((ScmFile) changedFiles.get(1), "src/test/java/Test.java", ScmFileStatus.DELETED);
}
use of org.apache.maven.scm.provider.git.gitexe.command.remove.GitRemoveConsumer in project maven-scm by apache.
the class GitRemoveConsumerTest method testEmptyLogConsumer.
public void testEmptyLogConsumer() throws Exception {
GitRemoveConsumer consumer = new GitRemoveConsumer(new DefaultLog());
File f = getTestFile("/src/test/resources/git/remove/gitrm-empty.gitlog");
BufferedReader r = new BufferedReader(new FileReader(f));
String line;
while ((line = r.readLine()) != null) {
consumer.consumeLine(line);
}
List<ScmFile> changedFiles = consumer.getRemovedFiles();
assertEquals(0, changedFiles.size());
}
use of org.apache.maven.scm.provider.git.gitexe.command.remove.GitRemoveConsumer in project maven-scm by apache.
the class GitRemoveConsumerTest method testConsumerRemovedFile.
public void testConsumerRemovedFile() {
GitRemoveConsumer consumer = new GitRemoveConsumer(new DefaultLog());
consumer.consumeLine("rm 'project.xml'");
List<ScmFile> changedFiles = consumer.getRemovedFiles();
assertNotNull(changedFiles);
assertEquals(1, changedFiles.size());
}
Aggregations