add unit tests

This commit is contained in:
MaysWind
2024-11-13 00:08:39 +08:00
parent 2d0e2e0cca
commit f5945a788f
7 changed files with 63 additions and 0 deletions
@@ -26,6 +26,15 @@ func TestInternationalMonetaryFundDataSource_StandardDataExtractBaseCurrency(t *
assert.Equal(t, "USD", actualLatestExchangeRateResponse.BaseCurrency)
}
func TestInternationalMonetaryFundDataSource_StandardDataExtractUpdateTime(t *testing.T) {
dataSource := &InternationalMonetaryFundDataSource{}
context := core.NewNullContext()
actualLatestExchangeRateResponse, err := dataSource.Parse(context, []byte(internationalMonetaryFundMinimumRequiredContent))
assert.Equal(t, nil, err)
assert.Equal(t, int64(1724857200), actualLatestExchangeRateResponse.UpdateTime)
}
func TestInternationalMonetaryFundDataSource_StandardDataExtractExchangeRates(t *testing.T) {
dataSource := &InternationalMonetaryFundDataSource{}
context := core.NewNullContext()