-
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.
Added CurrentExchangeRateProvider, prepared build gradle for integrat…
…ion tests
- Loading branch information
kamil.jedrzejuk
committed
Oct 3, 2024
1 parent
339e246
commit 6291c32
Showing
12 changed files
with
151 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,3 +50,4 @@ bin/ | |
### Mac OS ### | ||
.DS_Store | ||
/.idea/ | ||
/.kotlin/errors/*.log |
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
5 changes: 5 additions & 0 deletions
5
src/main/kotlin/camilyed/github/io/currencyexchangeapi/domain/CurrentExchangeRateProvider.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,5 @@ | ||
package camilyed.github.io.currencyexchangeapi.domain | ||
|
||
interface CurrentExchangeRateProvider { | ||
fun currentExchange(): ExchangeRate | ||
} |
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
13 changes: 13 additions & 0 deletions
13
...n/camilyed/github/io/currencyexchangeapi/testing/ability/GetCurrentExchangeRateAbility.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,13 @@ | ||
package camilyed.github.io.currencyexchangeapi.testing.ability | ||
|
||
import camilyed.github.io.currencyexchangeapi.domain.ExchangeRate | ||
import camilyed.github.io.currencyexchangeapi.testing.fakes.TestingCurrentExchangeRateProvider | ||
import java.math.BigDecimal | ||
|
||
interface GetCurrentExchangeRateAbility { | ||
val exchangeRateProvider: TestingCurrentExchangeRateProvider | ||
|
||
fun currentExchangeRateIs(rate: String) { | ||
exchangeRateProvider.setCurrentExchange(ExchangeRate(BigDecimal(rate))) | ||
} | ||
} |
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
Oops, something went wrong.