gin-example/pkg/infrastructure/externalimp/http_test.go
2023-09-14 14:49:47 +08:00

36 lines
751 B
Go

package externalimp
import (
"dddexample/pkg/domain/entity"
"reflect"
"testing"
)
func TestExchangeRage_GetExchangeRage(t *testing.T) {
type args struct {
nowCurrency string
nextCurrent string
}
tests := []struct {
name string
args args
want *entity.ExchangeRate
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
a := &ExchangeRage{}
got, err := a.GetExchangeRage(tt.args.nowCurrency, tt.args.nextCurrent)
if (err != nil) != tt.wantErr {
t.Errorf("GetExchangeRage() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("GetExchangeRage() got = %v, want %v", got, tt.want)
}
})
}
}