Reworked ModuleException.
This commit is contained in:
parent
29eae2e7ee
commit
3ea0e4b3ac
11 changed files with 58 additions and 49 deletions
|
@ -89,14 +89,14 @@ class ModuleExceptionTest {
|
|||
e = ModuleException(debugMessage, message, IOException())
|
||||
assertThat(e.sanitize(apiKey), "no cause message").hasMessage(message)
|
||||
|
||||
e = ModuleException(apiKey)
|
||||
e = ModuleException(debugMessage, apiKey)
|
||||
assertThat(e.sanitize(apiKey).message, "api key in message").isNotNull().doesNotContain(apiKey)
|
||||
|
||||
val msg: String? = null
|
||||
e = ModuleException(debugMessage, msg, IOException(msg))
|
||||
assertThat(e.sanitize(apiKey).message, "null message").isNull()
|
||||
|
||||
e = ModuleException(msg, msg, IOException("foo is $apiKey"))
|
||||
e = ModuleException(debugMessage, msg, IOException("foo is $apiKey"))
|
||||
assertThat(e.sanitize(" ", apiKey, "foo").message, "key in cause").isNotNull().all {
|
||||
doesNotContain(apiKey)
|
||||
endsWith("xxx is xxxxxxxxxx")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue