mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[git] cleanup: move method to the only place in tests where it is used
This commit is contained in:
@@ -118,12 +118,6 @@ class GitLogRecord {
|
||||
}
|
||||
}
|
||||
|
||||
String getAuthorAndCommitter() {
|
||||
String author = String.format("%s <%s>", myOptions.get(AUTHOR_NAME), myOptions.get(AUTHOR_EMAIL));
|
||||
String committer = String.format("%s <%s>", myOptions.get(COMMITTER_NAME), myOptions.get(COMMITTER_EMAIL));
|
||||
return GitUtil.adjustAuthorName(author, committer);
|
||||
}
|
||||
|
||||
String getFullMessage() {
|
||||
return mySupportsRawBody ? getRawBody().trim() : ((getSubject() + "\n\n" + getBody()).trim());
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.openapi.vcs.changes.Change;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.testFramework.LightVirtualFile;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import git4idea.GitUtil;
|
||||
@@ -184,7 +183,7 @@ public class GitLogParserTest extends GitPlatformTest {
|
||||
String expectedAuthorAndCommitter = GitUtil.adjustAuthorName(
|
||||
String.format("%s <%s>", expected.getAuthorName(), expected.getAuthorEmail()),
|
||||
String.format("%s <%s>", expected.getCommitterName(), expected.getCommitterEmail()));
|
||||
assertEquals(expectedAuthorAndCommitter, actual.getAuthorAndCommitter());
|
||||
assertEquals(expectedAuthorAndCommitter, getAuthorAndCommitter(actual));
|
||||
|
||||
|
||||
assertEquals(expected.getSubject(), actual.getSubject());
|
||||
@@ -201,6 +200,13 @@ public class GitLogParserTest extends GitPlatformTest {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
String getAuthorAndCommitter(@NotNull GitLogRecord actual) {
|
||||
String author = String.format("%s <%s>", actual.getAuthorName(), actual.getAuthorEmail());
|
||||
String committer = String.format("%s <%s>", actual.getCommitterName(), actual.getCommitterEmail());
|
||||
return GitUtil.adjustAuthorName(author, committer);
|
||||
}
|
||||
|
||||
private void assertPaths(List<FilePath> actualPaths, List<String> expectedPaths) {
|
||||
List<String> actual = ContainerUtil.map(actualPaths, new Function<FilePath, String>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user