Skip to content

Commit

Permalink
Restore defaukt config after each test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bram-- committed Apr 23, 2024
1 parent d95e826 commit 6195b98
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/kotlin/org/audux/bgg/BggClientTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,26 @@ import kotlinx.coroutines.runBlocking
import org.audux.bgg.response.Response
import org.audux.bgg.util.TestUtils
import org.audux.bgg.util.TestUtils.delayedResponse
import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.ValueSource

class BggClientTest {
private lateinit var defaultConfiguration: BggClientConfiguration

@BeforeEach
fun setUp() {
defaultConfiguration = BggClient.configuration
}

@AfterEach
fun tearDown() {
BggClient.configuration = defaultConfiguration
}

@ParameterizedTest
@ValueSource(ints = [202, 429, 500, 599])
fun `Retries on Http status codes`(statusCode: Int) {
Expand Down

0 comments on commit 6195b98

Please sign in to comment.