From 6d0fd48c37c9c87b9a1ffa0bf6de27aaa32be34e Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sat, 26 Mar 2016 17:46:42 +0300 Subject: [PATCH] git tests: convert to kotlin --- .../tests/git4idea/test/GitSingleRepoTest.kt | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/plugins/git4idea/tests/git4idea/test/GitSingleRepoTest.kt b/plugins/git4idea/tests/git4idea/test/GitSingleRepoTest.kt index 35141ccab134..4ba3d311d2df 100644 --- a/plugins/git4idea/tests/git4idea/test/GitSingleRepoTest.kt +++ b/plugins/git4idea/tests/git4idea/test/GitSingleRepoTest.kt @@ -13,31 +13,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package git4idea.test; +package git4idea.test -import git4idea.repo.GitRepository; -import org.jetbrains.annotations.NotNull; +import com.intellij.openapi.vcs.Executor.cd +import git4idea.repo.GitRepository -import static com.intellij.openapi.vcs.Executor.cd; +abstract class GitSingleRepoTest : GitPlatformTest() { -public abstract class GitSingleRepoTest extends GitPlatformTest { + protected lateinit var myRepo: GitRepository - @NotNull protected GitRepository myRepo; - - @Override - protected void setUp() throws Exception { - super.setUp(); - myRepo = GitTestUtil.createRepository(myProject, myProjectPath, makeInitialCommit()); - cd(myProjectPath); + @Throws(Exception::class) + override fun setUp() { + super.setUp() + myRepo = GitTestUtil.createRepository(myProject, myProjectPath, makeInitialCommit()) + cd(myProjectPath) } - @Override - protected void tearDown() throws Exception { - super.tearDown(); + protected open fun makeInitialCommit(): Boolean { + return true } - - protected boolean makeInitialCommit() { - return true; - } - }