-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for Jackson statement repository
- Loading branch information
Showing
12 changed files
with
86 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ out/ | |
|
||
settings*.json | ||
settings*.yml | ||
retries.json | ||
docker-compose.yml |
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
5 changes: 5 additions & 0 deletions
5
src/main/kotlin/io/github/smaugfm/monobudget/common/model/financial/StatementItem.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
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
28 changes: 28 additions & 0 deletions
28
src/test/kotlin/io/github/smaugfm/monobudget/integration/JacksonRepositoryRetriesTest.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,28 @@ | ||
package io.github.smaugfm.monobudget.integration | ||
|
||
import io.github.smaugfm.monobudget.common.retry.JacksonFileStatementRetryRepository | ||
import io.github.smaugfm.monobudget.common.retry.StatementRetryRepository | ||
import org.junit.jupiter.api.BeforeEach | ||
import org.koin.core.KoinApplication | ||
import org.koin.dsl.bind | ||
import org.koin.dsl.module | ||
import java.nio.file.Files | ||
import java.nio.file.Paths | ||
|
||
class JacksonRepositoryRetriesTest : RetriesTest() { | ||
private val repo = JacksonFileStatementRetryRepository(Paths.get("retries.json")) | ||
|
||
override fun testKoinApplication(app: KoinApplication) { | ||
super.testKoinApplication(app) | ||
app.modules( | ||
module { | ||
single { repo } bind StatementRetryRepository::class | ||
}, | ||
) | ||
} | ||
|
||
@BeforeEach | ||
fun deleteFile() { | ||
Files.deleteIfExists(Paths.get("retries.json")) | ||
} | ||
} |
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