Converted Mobibot class to Kotlin.
This commit is contained in:
parent
a44b0c1f49
commit
69441f7006
30 changed files with 956 additions and 1134 deletions
|
@ -31,11 +31,11 @@
|
|||
*/
|
||||
package net.thauvin.erik.mobibot.commands.tell
|
||||
|
||||
import java.time.temporal.Temporal
|
||||
import java.time.LocalDateTime
|
||||
import org.assertj.core.api.Assertions
|
||||
import org.testng.annotations.Test
|
||||
import java.time.Duration
|
||||
import java.time.LocalDateTime
|
||||
import java.time.temporal.Temporal
|
||||
|
||||
/**
|
||||
* The `TellMessageTest` class.
|
||||
|
|
|
@ -62,7 +62,7 @@ class GoogleSearchTest : LocalProperties() {
|
|||
.`as`("no query").isInstanceOf(ModuleException::class.java).hasNoCause()
|
||||
} catch (e: ModuleException) {
|
||||
// Avoid displaying api keys in CI logs
|
||||
if ("true" == System.getenv("CI") && !apiKey.isNullOrBlank() && !cseKey.isNullOrBlank()) {
|
||||
if ("true" == System.getenv("CI") && !apiKey.isBlank() && !cseKey.isBlank()) {
|
||||
throw ModuleException(e.debugMessage, e.getSanitizedMessage(apiKey, cseKey))
|
||||
} else {
|
||||
throw e
|
||||
|
|
|
@ -63,7 +63,7 @@ class StockQuoteTest : LocalProperties() {
|
|||
.isInstanceOf(ModuleException::class.java).hasNoCause()
|
||||
} catch (e: ModuleException) {
|
||||
// Avoid displaying api keys in CI logs
|
||||
if ("true" == System.getenv("CI") && !apiKey.isNullOrBlank()) {
|
||||
if ("true" == System.getenv("CI") && !apiKey.isBlank()) {
|
||||
throw ModuleException(e.debugMessage, e.getSanitizedMessage(apiKey))
|
||||
} else {
|
||||
throw e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue