This commit is contained in:
Erik C. Thauvin 2020-12-08 01:40:09 -08:00
parent e01de36909
commit 629e26b292
25 changed files with 75 additions and 103 deletions

View file

@ -58,7 +58,6 @@ class TellMessageTest {
Assertions.assertThat(tellMessage.isMatch(sender)).`as`("match sender").isTrue
Assertions.assertThat(tellMessage.isMatch(recipient)).`as`("match recipient").isTrue
Assertions.assertThat(tellMessage.isMatch("foo")).`as`("foo is no match").isFalse
Assertions.assertThat(tellMessage.isMatchId(tellMessage.id)).`as`("is match ID").isTrue
tellMessage.isReceived = true
Assertions.assertThat(tellMessage.isReceived).`as`("is received").isTrue
Assertions.assertThat(isValidDate(tellMessage.receptionDate)).`as`("received is valid date/time").isTrue

View file

@ -67,7 +67,7 @@ class EntryLinkTest {
while (entryLink.comments.size > 0) {
entryLink.deleteComment(r.nextInt(entryLink.comments.size))
}
Assertions.assertThat(entryLink.hasComments()).`as`("hasComments()").isFalse
Assertions.assertThat(entryLink.comments.isNotEmpty()).`as`("hasComments()").isFalse
entryLink.addComment("nothing", "nobody")
entryLink.setComment(0, "something", "somebody")
Assertions.assertThat(entryLink.getComment(0).nick).`as`("getNick(somebody)").isEqualTo("somebody")
@ -81,7 +81,7 @@ class EntryLinkTest {
Assertions.assertThat(tag.name).`as`("tag.getName($i)").isEqualTo("tag" + (i + 1))
}
Assertions.assertThat(entryLink.tags.size).`as`("getTags().size() is 5").isEqualTo(5)
Assertions.assertThat(entryLink.hasTags()).`as`("hasTags() is true").isTrue
Assertions.assertThat(entryLink.tags.isNotEmpty()).`as`("hasTags() is true").isTrue
entryLink.setTags("-tag5")
entryLink.setTags("+mobitopia")
entryLink.setTags("tag4")

View file

@ -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.isBlank() && !cseKey.isBlank()) {
if ("true" == System.getenv("CI") && apiKey.isNotBlank() && cseKey.isNotBlank()) {
throw ModuleException(e.debugMessage, e.getSanitizedMessage(apiKey, cseKey))
} else {
throw e

View file

@ -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.isBlank()) {
if ("true" == System.getenv("CI") && apiKey.isNotBlank()) {
throw ModuleException(e.debugMessage, e.getSanitizedMessage(apiKey))
} else {
throw e