Skip to content

Commit

Permalink
add a manual test
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Oct 1, 2024
1 parent 81148dd commit 1fa03da
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ class TokenServiceTest {
assert(result.isNotEmpty()) { "Expected non-empty list of HistoricalPrice" }
}

@Test
@Disabled("Test was used to manually call the endpoint")
fun `test fetchHistoricalPriceData and process `() = runBlocking {
val fromDate = DateTime.now().minusDays(1)

val result: List<HistoricalPrice> = tokenService.fetchHistoricalPriceData(fromDate)

tokenService.processLatestTokenData(result, fromDate)

result.forEach {
println("Time: ${DateTime(it.time)}, Open: ${it.open}, High: ${it.high}, Low: ${it.low}, Close: ${it.close}, Volume: ${it.volume}")
}

assert(result.isNotEmpty()) { "Expected non-empty list of HistoricalPrice" }
}

@Test
@Disabled("Test was used to manually call the endpoint")
fun `test fetchLegacyHistoricalPriceData`() = runBlocking {
Expand Down

0 comments on commit 1fa03da

Please sign in to comment.