From 86eecd38b6b601b3fbc451137520a88bb19ce6bc Mon Sep 17 00:00:00 2001 From: Julien WITTOUCK Date: Mon, 6 Jan 2020 19:09:45 +0100 Subject: [PATCH] :rotating_light: : make attributes private --- .../registries/controller/GithubRegistryController.kt | 10 +++++----- .../controller/GithubRegistryControllerTest.kt | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/codeka/gaia/registries/controller/GithubRegistryController.kt b/src/main/java/io/codeka/gaia/registries/controller/GithubRegistryController.kt index afbbf3168..62349e500 100644 --- a/src/main/java/io/codeka/gaia/registries/controller/GithubRegistryController.kt +++ b/src/main/java/io/codeka/gaia/registries/controller/GithubRegistryController.kt @@ -18,14 +18,14 @@ import java.util.* @RequestMapping("/api/registries/github") @Secured class GithubRegistryController( - val githubRegistryApi: RegistryApi, - val hclParser: HclParser, - val cliRepository: TerraformCLIRepository, - val moduleRepository: TerraformModuleRepository) { + private val githubRegistryApi: RegistryApi, + private val hclParser: HclParser, + private val cliRepository: TerraformCLIRepository, + private val moduleRepository: TerraformModuleRepository) { @GetMapping("/repositories") fun getRepositories(user: User): List { - return this.githubRegistryApi.getRepositories(user); + return this.githubRegistryApi.getRepositories(user) } @GetMapping("/repositories/{owner}/{repo}/import") diff --git a/src/test/java/io/codeka/gaia/registries/controller/GithubRegistryControllerTest.kt b/src/test/java/io/codeka/gaia/registries/controller/GithubRegistryControllerTest.kt index 6f44a2bed..178ec7950 100644 --- a/src/test/java/io/codeka/gaia/registries/controller/GithubRegistryControllerTest.kt +++ b/src/test/java/io/codeka/gaia/registries/controller/GithubRegistryControllerTest.kt @@ -90,8 +90,6 @@ class GithubRegistryControllerTest{ } } -fun Stubber.whenever(mock: T) = `when`(mock) - inline fun whenever(methodCall: T): OngoingStubbing { return Mockito.`when`(methodCall)!! } \ No newline at end of file