Skip to content

Commit

Permalink
test(ut): add AnthropicTest for anthropic initialization logic
Browse files Browse the repository at this point in the history
  • Loading branch information
hanrw committed Jun 4, 2024
1 parent 8eaccfc commit 98ea4e4
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.tddworks.anthropic.api

import com.tddworks.anthropic.di.iniAnthropic
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.koin.test.junit5.AutoCloseKoinTest


class AnthropicTest : AutoCloseKoinTest() {

@BeforeEach
fun setUp() {
iniAnthropic(config = AnthropicConfig())
}

@Test
fun `should create anthropic with default settings`() {

val anthropic = Anthropic()

assertEquals("CONFIGURE_ME", anthropic.apiKey())
assertEquals(Anthropic.BASE_URL, anthropic.baseUrl())
assertEquals("2023-06-01", anthropic.anthropicVersion())
}
}

0 comments on commit 98ea4e4

Please sign in to comment.