-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up proper toString() values where appropriate
- Loading branch information
1 parent
1c44b3a
commit eb6461c
Showing
55 changed files
with
1,391 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...analytics/src/commonTest/kotlin/com/copperleaf/ballast/analytics/BallastAnalyticsTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.copperleaf.ballast.analytics | ||
|
||
import io.kotest.core.spec.style.StringSpec | ||
import io.kotest.matchers.shouldBe | ||
|
||
class BallastAnalyticsTests : StringSpec({ | ||
"check toString values" { | ||
AnalyticsInterceptor<Any, Any, Any>( | ||
tracker = TestAnalyticsTracker(), | ||
shouldTrackInput = { true }, | ||
).toString() shouldBe "AnalyticsInterceptor(tracker=TestAnalyticsTracker)" | ||
} | ||
}) | ||
|
||
private class TestAnalyticsTracker : AnalyticsTracker { | ||
override fun trackAnalyticsEvent(eventId: String, eventParameters: Map<String, String>) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun toString(): String { | ||
return "TestAnalyticsTracker" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...src/commonTest/kotlin/com/copperleaf/ballast/crashreporting/BallastCrashReportingTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.copperleaf.ballast.crashreporting | ||
|
||
import io.kotest.core.spec.style.StringSpec | ||
import io.kotest.matchers.shouldBe | ||
|
||
class BallastCrashReportingTests : StringSpec({ | ||
"check toString values" { | ||
CrashReportingInterceptor<Any, Any, Any>( | ||
crashReporter = TestCrashReporter(), | ||
shouldTrackInput = { true }, | ||
).toString() shouldBe "CrashReportingInterceptor(crashReporter=TestCrashReporter)" | ||
} | ||
}) | ||
|
||
private class TestCrashReporter : CrashReporter { | ||
override fun logInput(viewModelName: String, input: Any) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun recordInputError(viewModelName: String, input: Any, throwable: Throwable) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun recordEventError(viewModelName: String, event: Any, throwable: Throwable) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun recordSideJobError(viewModelName: String, key: String, throwable: Throwable) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun recordUnhandledError(viewModelName: String, throwable: Throwable) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun toString(): String { | ||
return "TestCrashReporter" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...gger-client/src/commonTest/kotlin/com/copperleaf/ballast/debugger/BallastDebuggerTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.copperleaf.ballast.debugger | ||
|
||
import io.kotest.core.spec.style.StringSpec | ||
import io.kotest.matchers.shouldBe | ||
import io.ktor.client.engine.HttpClientEngine | ||
import io.ktor.client.engine.HttpClientEngineConfig | ||
import io.ktor.client.engine.HttpClientEngineFactory | ||
import io.ktor.client.request.HttpRequestData | ||
import io.ktor.client.request.HttpResponseData | ||
import io.ktor.util.InternalAPI | ||
import kotlinx.coroutines.CoroutineDispatcher | ||
import kotlin.coroutines.CoroutineContext | ||
|
||
class BallastDebuggerTests : StringSpec({ | ||
"check toString values" { | ||
BallastDebuggerInterceptor<Any, Any, Any>( | ||
connection = BallastDebuggerClientConnection(TestHttpEngine, this), | ||
).toString() shouldBe "BallastDebuggerInterceptor" | ||
} | ||
}) | ||
|
||
private object TestHttpEngine : HttpClientEngineFactory<TestEngineConfig> { | ||
override fun create(block: TestEngineConfig.() -> Unit): HttpClientEngine { | ||
return TestHttpClientEngine() | ||
} | ||
|
||
override fun toString(): String = "TestHttpEngine" | ||
} | ||
|
||
private class TestEngineConfig : HttpClientEngineConfig() | ||
private class TestHttpClientEngine : HttpClientEngine { | ||
override val config: HttpClientEngineConfig | ||
get() = TODO("Not yet implemented") | ||
override val dispatcher: CoroutineDispatcher | ||
get() = TODO("Not yet implemented") | ||
|
||
@InternalAPI | ||
override suspend fun execute(data: HttpRequestData): HttpResponseData { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun close() { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override val coroutineContext: CoroutineContext | ||
get() = TODO("Not yet implemented") | ||
} |
Oops, something went wrong.