From 517e29068df924eb9bd626248a86e7a476f7bbb2 Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Tue, 16 Oct 2018 20:09:05 +0300 Subject: [PATCH] [git] cleanup GitTestChange --- .../git4idea/history/GitLogParserTest.kt | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/git4idea/tests/git4idea/history/GitLogParserTest.kt b/plugins/git4idea/tests/git4idea/history/GitLogParserTest.kt index 1f864e2bcd96..e01322a7886e 100644 --- a/plugins/git4idea/tests/git4idea/history/GitLogParserTest.kt +++ b/plugins/git4idea/tests/git4idea/history/GitLogParserTest.kt @@ -131,7 +131,7 @@ class GitLogParserTest : GitPlatformTest() { TestCase.assertEquals(expected.authorName, actual.authorName) TestCase.assertEquals(expected.authorEmail, actual.authorEmail) TestCase.assertEquals(expected.authorTime.time, actual.authorTimeStamp) - + TestCase.assertEquals(expected.subject, actual.subject) TestCase.assertEquals(expected.body, actual.body) TestCase.assertEquals(expected.rawBody(), actual.rawBody) @@ -318,9 +318,19 @@ private class GitTestLogRecord internal constructor(private val data: Map return "R100" + Change.Type.MODIFICATION -> return "M" + Change.Type.DELETED -> return "D" + Change.Type.NEW -> return "A" + else -> throw AssertionError() + } + } + + internal fun toOutputString(): String { val sb = StringBuilder() - sb.append(type).append("\t") + sb.append(toOutputString(type)).append("\t") if (beforePath != null) { sb.append(beforePath).append("\t") } @@ -330,16 +340,6 @@ private class GitTestLogRecord internal constructor(private val data: Map return outputString("R100", beforePath, afterPath) - Change.Type.MODIFICATION -> return outputString("M", beforePath, null) - Change.Type.DELETED -> return outputString("D", beforePath, null) - Change.Type.NEW -> return outputString("A", afterPath, null) - else -> throw AssertionError() - } - } } }