From ecd9d600f0ab265f343f3697f6f36a17a35f9aa6 Mon Sep 17 00:00:00 2001 From: Joao Esperancinha Date: Fri, 27 Jan 2023 15:48:53 +0100 Subject: [PATCH] Reports coverage --- .../main/kotlin/org/jesperancinha/fintech/JwtGenerator.kt | 6 +++++- .../kotlin/org/jesperancinha/fintech/JwtGeneratorTest.kt | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/your-finance-k-jwt-generator/src/main/kotlin/org/jesperancinha/fintech/JwtGenerator.kt b/your-finance-k-jwt-generator/src/main/kotlin/org/jesperancinha/fintech/JwtGenerator.kt index 41f8227..07361a3 100644 --- a/your-finance-k-jwt-generator/src/main/kotlin/org/jesperancinha/fintech/JwtGenerator.kt +++ b/your-finance-k-jwt-generator/src/main/kotlin/org/jesperancinha/fintech/JwtGenerator.kt @@ -6,7 +6,11 @@ import kotlin.system.exitProcess object JwtGenerator { @JvmStatic fun main(args: Array) { - val exitCode = CommandLine(JwtGeneratorCommand()).execute(*args) + val exitCode = runCommand(args) exitProcess(exitCode) } + + fun runCommand(args: Array) = + CommandLine(JwtGeneratorCommand()).execute(*args) + } \ No newline at end of file diff --git a/your-finance-k-jwt-generator/src/test/kotlin/org/jesperancinha/fintech/JwtGeneratorTest.kt b/your-finance-k-jwt-generator/src/test/kotlin/org/jesperancinha/fintech/JwtGeneratorTest.kt index 00f8aac..ec44b8d 100644 --- a/your-finance-k-jwt-generator/src/test/kotlin/org/jesperancinha/fintech/JwtGeneratorTest.kt +++ b/your-finance-k-jwt-generator/src/test/kotlin/org/jesperancinha/fintech/JwtGeneratorTest.kt @@ -1,10 +1,11 @@ package org.jesperancinha.fintech +import org.jesperancinha.fintech.JwtGenerator.runCommand import org.junit.jupiter.api.Test internal class JwtGeneratorTest { @Test - fun `should just run`() { - + fun `should not run with empty input arguments but also not result in exception`() { + runCommand(arrayOf()) } } \ No newline at end of file