-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(ut): add ut for DefaultHttpRequester and Exceptions
- refactor codes - remove unused class
- Loading branch information
Showing
8 changed files
with
38 additions
and
130 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
7 changes: 0 additions & 7 deletions
7
...pic-client/anthropic-client-core/src/jvmMain/kotlin/com/tddworks/anthropic/di/Koin.jvm.kt
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...client/anthropic-client-core/src/macosMain/kotlin/com/tddworks/anthropic/di/Koin.macos.kt
This file was deleted.
Oops, something went wrong.
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
21 changes: 21 additions & 0 deletions
21
openai-client/openai-client-core/src/jvmTest/kotlin/com/tddworks/openai/di/OpenAIKoinTest.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,21 @@ | ||
package com.tddworks.openai.di | ||
|
||
import com.tddworks.openai.api.OpenAI | ||
import com.tddworks.openai.api.OpenAIConfig | ||
import org.junit.jupiter.api.Test | ||
import org.koin.dsl.koinApplication | ||
import org.koin.test.check.checkModules | ||
import org.koin.test.junit5.AutoCloseKoinTest | ||
|
||
class OpenAIKoinTest : AutoCloseKoinTest() { | ||
|
||
@Test | ||
fun `should initialize openai koin modules`() { | ||
koinApplication { | ||
initOpenAI(OpenAIConfig( | ||
baseUrl = { OpenAI.BASE_URL }, | ||
apiKey = { System.getenv("OPENAI_API_KEY") ?: "CONFIGURE_ME" } | ||
)) | ||
}.checkModules() | ||
} | ||
} |
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