本文整理汇总了Java中org.sonar.api.batch.scm.BlameCommand.BlameOutput类的典型用法代码示例。如果您正苦于以下问题:Java BlameOutput类的具体用法?Java BlameOutput怎么用?Java BlameOutput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BlameOutput类属于org.sonar.api.batch.scm.BlameCommand包,在下文中一共展示了BlameOutput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: properFailureIfNotAGitProject
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void properFailureIfNotAGitProject() throws IOException {
File projectDir = temp.newFolder();
javaUnzip(new File("test-repos/dummy-git.zip"), projectDir);
JGitBlameCommand jGitBlameCommand = new JGitBlameCommand(new PathResolver());
File baseDir = new File(projectDir, "dummy-git");
// Delete .git
FileUtils.forceDelete(new File(baseDir, ".git"));
DefaultFileSystem fs = new DefaultFileSystem(baseDir);
when(input.fileSystem()).thenReturn(fs);
DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA).build();
fs.add(inputFile);
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
thrown.expect(MessageException.class);
thrown.expectMessage("Not inside a Git work tree: ");
jGitBlameCommand.blame(input, blameResult);
}
示例2: dontFailOnModifiedFile
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void dontFailOnModifiedFile() throws IOException {
File projectDir = temp.newFolder();
javaUnzip(new File("test-repos/dummy-git.zip"), projectDir);
JGitBlameCommand jGitBlameCommand = new JGitBlameCommand(new PathResolver());
File baseDir = new File(projectDir, "dummy-git");
DefaultFileSystem fs = new DefaultFileSystem(baseDir);
when(input.fileSystem()).thenReturn(fs);
String relativePath = DUMMY_JAVA;
DefaultInputFile inputFile = new TestInputFileBuilder("foo", relativePath).build();
fs.add(inputFile);
// Emulate a modification
Files.write(baseDir.toPath().resolve(relativePath), "modification and \n some new line".getBytes());
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
jGitBlameCommand.blame(input, blameResult);
}
示例3: dontFailOnNewFile
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void dontFailOnNewFile() throws IOException {
File projectDir = temp.newFolder();
javaUnzip(new File("test-repos/dummy-git.zip"), projectDir);
JGitBlameCommand jGitBlameCommand = new JGitBlameCommand(new PathResolver());
File baseDir = new File(projectDir, "dummy-git");
DefaultFileSystem fs = new DefaultFileSystem(baseDir);
when(input.fileSystem()).thenReturn(fs);
String relativePath = DUMMY_JAVA;
String relativePath2 = "src/main/java/org/dummy/Dummy2.java";
DefaultInputFile inputFile = new TestInputFileBuilder("foo", relativePath).build();
fs.add(inputFile);
DefaultInputFile inputFile2 = new TestInputFileBuilder("foo", relativePath2).build();
fs.add(inputFile2);
// Emulate a new file
FileUtils.copyFile(new File(baseDir, relativePath), new File(baseDir, relativePath2));
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile, inputFile2));
jGitBlameCommand.blame(input, blameResult);
}
示例4: should_fail_fast_when_clone_is_shallow
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void should_fail_fast_when_clone_is_shallow() throws IOException {
File projectDir = temp.newFolder();
javaUnzip(new File("test-repos/shallow-git.zip"), projectDir);
File baseDir = new File(projectDir, "shallow-git");
DefaultFileSystem fs = new DefaultFileSystem(baseDir);
when(input.fileSystem()).thenReturn(fs);
DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA).build();
when(input.filesToBlame()).thenReturn(Collections.singleton(inputFile));
JGitBlameCommand jGitBlameCommand = new JGitBlameCommand(new PathResolver());
BlameOutput output = mock(BlameOutput.class);
jGitBlameCommand.blame(input, output);
assertThat(logTester.logs()).first()
.matches(s -> s.contains("Shallow clone detected, no blame information will be provided."));
verifyZeroInteractions(output);
}
示例5: shouldNotFailIfFileContainsLocalModification
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void shouldNotFailIfFileContainsLocalModification() throws Exception {
File repoDir = unzip("repo-svn.zip");
String scmUrl = "file:///" + unixPath(new File(repoDir, "repo-svn"));
File baseDir = new File(checkout(scmUrl), "dummy-svn");
when(fs.baseDir()).thenReturn(baseDir);
DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA)
.setLines(28)
.setModuleBaseDir(baseDir.toPath())
.build();
Files.write(baseDir.toPath().resolve(DUMMY_JAVA), "\n//foo".getBytes(), StandardOpenOption.APPEND);
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
newSvnBlameCommand().blame(input, blameResult);
verifyZeroInteractions(blameResult);
}
示例6: shouldNotFailOnWrongFilename
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void shouldNotFailOnWrongFilename() throws Exception {
File repoDir = unzip("repo-svn.zip");
String scmUrl = "file:///" + unixPath(new File(repoDir, "repo-svn"));
File baseDir = new File(checkout(scmUrl), "dummy-svn");
when(fs.baseDir()).thenReturn(baseDir);
DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA.toLowerCase())
.setLines(27)
.setModuleBaseDir(baseDir.toPath())
.build();
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
newSvnBlameCommand().blame(input, blameResult);
verifyZeroInteractions(blameResult);
}
示例7: shouldNotFailOnUncommitedFile
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void shouldNotFailOnUncommitedFile() throws Exception {
File repoDir = unzip("repo-svn.zip");
String scmUrl = "file:///" + unixPath(new File(repoDir, "repo-svn"));
File baseDir = new File(checkout(scmUrl), "dummy-svn");
when(fs.baseDir()).thenReturn(baseDir);
String relativePath = "src/main/java/org/dummy/Dummy2.java";
DefaultInputFile inputFile = new TestInputFileBuilder("foo", relativePath)
.setLines(28)
.setModuleBaseDir(baseDir.toPath())
.build();
Files.write(baseDir.toPath().resolve(relativePath), "package org.dummy;\npublic class Dummy2 {}".getBytes());
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
newSvnBlameCommand().blame(input, blameResult);
verifyZeroInteractions(blameResult);
}
示例8: shouldNotFailOnUncommitedDir
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void shouldNotFailOnUncommitedDir() throws Exception {
File repoDir = unzip("repo-svn.zip");
String scmUrl = "file:///" + unixPath(new File(repoDir, "repo-svn"));
File baseDir = new File(checkout(scmUrl), "dummy-svn");
when(fs.baseDir()).thenReturn(baseDir);
String relativePath = "src/main/java/org/dummy2/dummy/Dummy.java";
DefaultInputFile inputFile = new TestInputFileBuilder("foo", relativePath)
.setLines(28)
.setModuleBaseDir(baseDir.toPath())
.build();
Path filepath = new File(baseDir, relativePath).toPath();
Files.createDirectories(filepath.getParent());
Files.write(filepath, "package org.dummy;\npublic class Dummy {}".getBytes());
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
newSvnBlameCommand().blame(input, blameResult);
verifyZeroInteractions(blameResult);
}
示例9: dontFailOnSymlink
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void dontFailOnSymlink() throws IOException {
assumeTrue(!System2.INSTANCE.isOsWindows());
File projectDir = temp.newFolder();
javaUnzip(new File("test-repos/dummy-git.zip"), projectDir);
JGitBlameCommand jGitBlameCommand = new JGitBlameCommand(new PathResolver());
File baseDir = new File(projectDir, "dummy-git");
DefaultFileSystem fs = new DefaultFileSystem(baseDir);
when(input.fileSystem()).thenReturn(fs);
String relativePath = DUMMY_JAVA;
String relativePath2 = "src/main/java/org/dummy/Dummy2.java";
DefaultInputFile inputFile = new TestInputFileBuilder("foo", relativePath)
.setModuleBaseDir(baseDir.toPath())
.build();
fs.add(inputFile);
DefaultInputFile inputFile2 = new TestInputFileBuilder("foo", relativePath2)
.setModuleBaseDir(baseDir.toPath())
.build();
fs.add(inputFile2);
// Create symlink
Files.createSymbolicLink(inputFile2.file().toPath(), inputFile.file().toPath());
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile, inputFile2));
jGitBlameCommand.blame(input, blameResult);
}
示例10: testUnknowError
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void testUnknowError() throws IOException, AuthenticationException, CommandException {
File source = new File(baseDir, "src/foo.xoo");
FileUtils.write(source, "sample content");
DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo")
.setAbsolutePath(new File(baseDir, "src/foo.xoo").getAbsolutePath())
.setLines(7);
fs.add(inputFile);
BlameOutput result = mock(BlameOutput.class);
CvsCommandExecutor commandExecutor = mock(CvsCommandExecutor.class);
when(commandExecutor.processCommand(eq("annotate"), any(GlobalOptions.class), any(String[].class), any(File.class), any(CVSListener.class))).thenAnswer(new Answer<Boolean>() {
@Override
public Boolean answer(InvocationOnMock invocation) throws Throwable {
CVSListener listener = (CVSListener) invocation.getArguments()[4];
listener.messageSent(new MessageEvent("", "Unknow error", true));
return false;
}
});
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
File tempFile = temp.newFile("cvs");
TempFolder tempFolder = mock(TempFolder.class);
when(tempFolder.newDir("cvs")).thenReturn(tempFile);
thrown.expect(IllegalStateException.class);
thrown
.expectMessage("The CVS annotate command [cvs -d :pserver:bar -t -f -T " + tempFile.getAbsolutePath()
+ " annotate src/foo.xoo] failed.");
thrown.expectMessage("Unknow error");
new CvsBlameCommand(mock(CvsConfiguration.class), tempFolder, commandExecutor).blame(input, result);
}
示例11: testBlame
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void testBlame() throws IOException {
File projectDir = temp.newFolder();
javaUnzip(new File("test-repos/dummy-git.zip"), projectDir);
JGitBlameCommand jGitBlameCommand = new JGitBlameCommand(new PathResolver());
File baseDir = new File(projectDir, "dummy-git");
DefaultFileSystem fs = new DefaultFileSystem(baseDir);
when(input.fileSystem()).thenReturn(fs);
DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA)
.setModuleBaseDir(baseDir.toPath())
.build();
fs.add(inputFile);
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
jGitBlameCommand.blame(input, blameResult);
Date revisionDate1 = DateUtils.parseDateTime("2012-07-17T16:12:48+0200");
String revision1 = "6b3aab35a3ea32c1636fee56f996e677653c48ea";
String author1 = "[email protected]";
// second commit, which has a commit date different than the author date
Date revisionDate2 = DateUtils.parseDateTime("2015-05-19T13:31:09+0200");
String revision2 = "0d269c1acfb8e6d4d33f3c43041eb87e0df0f5e7";
String author2 = "[email protected]";
List<BlameLine> expectedBlame = new LinkedList<>();
for (int i = 0; i < 25; i++) {
expectedBlame.add(new BlameLine().revision(revision1).date(revisionDate1).author(author1));
}
for (int i = 0; i < 3; i++) {
expectedBlame.add(new BlameLine().revision(revision2).date(revisionDate2).author(author2));
}
for (int i = 0; i < 1; i++) {
expectedBlame.add(new BlameLine().revision(revision1).date(revisionDate1).author(author1));
}
verify(blameResult).blameResult(inputFile, expectedBlame);
}
示例12: testBlameOnNestedModule
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void testBlameOnNestedModule() throws IOException {
File projectDir = temp.newFolder();
javaUnzip(new File("test-repos/dummy-git-nested.zip"), projectDir);
JGitBlameCommand jGitBlameCommand = new JGitBlameCommand(new PathResolver());
File baseDir = new File(projectDir, "dummy-git-nested/dummy-project");
DefaultFileSystem fs = new DefaultFileSystem(baseDir);
when(input.fileSystem()).thenReturn(fs);
DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA)
.setModuleBaseDir(baseDir.toPath())
.build();
fs.add(inputFile);
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
jGitBlameCommand.blame(input, blameResult);
Date revisionDate = DateUtils.parseDateTime("2012-07-17T16:12:48+0200");
String revision = "6b3aab35a3ea32c1636fee56f996e677653c48ea";
String author = "[email protected]";
verify(blameResult).blameResult(inputFile,
Arrays.asList(
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author),
new BlameLine().revision(revision).date(revisionDate).author(author)));
}
示例13: testParsingOfOutput
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void testParsingOfOutput() throws Exception {
File repoDir = unzip("repo-svn.zip");
String scmUrl = "file:///" + unixPath(new File(repoDir, "repo-svn"));
File baseDir = new File(checkout(scmUrl), "dummy-svn");
when(fs.baseDir()).thenReturn(baseDir);
DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA)
.setLines(27)
.setModuleBaseDir(baseDir.toPath())
.build();
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
newSvnBlameCommand().blame(input, blameResult);
ArgumentCaptor<List> captor = ArgumentCaptor.forClass(List.class);
verify(blameResult).blameResult(eq(inputFile), captor.capture());
List<BlameLine> result = captor.getValue();
assertThat(result).hasSize(27);
Date commitDate = new Date(1342691097393L);
assertThat(result).containsExactly(
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"));
}
示例14: testParsingOfOutputWithMergeHistory
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void testParsingOfOutputWithMergeHistory() throws Exception {
File repoDir = unzip("repo-svn-with-merge.zip");
String scmUrl = "file:///" + unixPath(new File(repoDir, "repo-svn"));
File baseDir = new File(checkout(scmUrl), "dummy-svn/trunk");
when(fs.baseDir()).thenReturn(baseDir);
DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA)
.setLines(27)
.setModuleBaseDir(baseDir.toPath())
.build();
BlameOutput blameResult = mock(BlameOutput.class);
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile));
newSvnBlameCommand().blame(input, blameResult);
ArgumentCaptor<List> captor = ArgumentCaptor.forClass(List.class);
verify(blameResult).blameResult(eq(inputFile), captor.capture());
List<BlameLine> result = captor.getValue();
assertThat(result).hasSize(27);
Date commitDate = new Date(1342691097393L);
Date revision6Date = new Date(1415262184300L);
assertThat(result).containsExactly(
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(revision6Date).revision("6").author("henryju"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(revision6Date).revision("6").author("henryju"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"),
new BlameLine().date(commitDate).revision("2").author("dgageot"));
}
示例15: testParsingOfOutput
import org.sonar.api.batch.scm.BlameCommand.BlameOutput; //导入依赖的package包/类
@Test
public void testParsingOfOutput() throws IOException, AuthenticationException, CommandException {
File source = new File(baseDir, "src/foo.xoo");
FileUtils.write(source, "sample content");
DefaultInputFile inputFile1 = new DefaultInputFile("foo", "src/foo.xoo")
.setAbsolutePath(new File(baseDir, "src/foo.xoo").getAbsolutePath())
.setLines(7);
fs.add(inputFile1);
DefaultInputFile inputFile2 = new DefaultInputFile("foo", "src/foo.xoo")
.setAbsolutePath(new File(baseDir, "src/foo.xoo").getAbsolutePath())
.setLines(8);
fs.add(inputFile2);
BlameOutput result = mock(BlameOutput.class);
CvsCommandExecutor commandExecutor = mock(CvsCommandExecutor.class);
when(commandExecutor.processCommand(eq("annotate"), any(GlobalOptions.class), any(String[].class), any(File.class), any(CVSListener.class))).thenAnswer(new Answer<Boolean>() {
@Override
public Boolean answer(InvocationOnMock invocation) throws Throwable {
CVSListener listener = (CVSListener) invocation.getArguments()[4];
List<String> lines = IOUtils.readLines(getClass().getResourceAsStream("/annotate.xml"), "UTF-8");
for (String line : lines) {
listener.messageSent(new MessageEvent("", line, false));
}
return true;
}
});
when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile1, inputFile2));
new CvsBlameCommand(mock(CvsConfiguration.class), new DefaultTempFolder(temp.newFolder()), commandExecutor).blame(input, result);
verify(result).blameResult(inputFile1,
Arrays.asList(
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.2").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien")));
verify(result).blameResult(inputFile2,
Arrays.asList(
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.2").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien"),
new BlameLine().date(DateUtils.parseDateTime("2014-10-21T00:00:00+0000")).revision("1.1").author("julien")));
}