diff options
| author | Shulhan <ms@kilabit.info> | 2022-11-30 11:54:48 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-11-30 11:54:48 +0700 |
| commit | 94f3139e32b16008e239b708f31366dc8d57bc48 (patch) | |
| tree | a2da9442ddc37d6720c28b40652cd27ead5a2656 /client_test.go | |
| parent | 8b09c9242786c89c230648527d39fbdf0276fc5c (diff) | |
| download | duitku-94f3139e32b16008e239b708f31366dc8d57bc48.tar.xz | |
all: change the parameter of ClearingTransfer and RtolTransfer
Instead of using request and response from inquiry, pass the actual
Transfer type.
This is to minimize confusion and to allow the caller to log the request
on their side.
Diffstat (limited to 'client_test.go')
| -rw-r--r-- | client_test.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/client_test.go b/client_test.go index 4943486..fc6ba03 100644 --- a/client_test.go +++ b/client_test.go @@ -84,9 +84,11 @@ func TestClient_ClearingTransfer_sandbox(t *testing.T) { inquiryReq ClearingInquiry inquiryRes ClearingInquiryResponse - err error - tdata *test.Data + transferReq *ClearingTransfer transferRes *ClearingTransferResponse + + tdata *test.Data + err error ) tdata, err = test.LoadData(`testdata/disbursement/clearing_transfer_test.txt`) @@ -103,7 +105,9 @@ func TestClient_ClearingTransfer_sandbox(t *testing.T) { t.Fatal(err) } - transferRes, err = testClient.ClearingTransfer(&inquiryReq, &inquiryRes) + transferReq = NewClearingTransfer(&inquiryReq, &inquiryRes) + + transferRes, err = testClient.ClearingTransfer(transferReq) if err != nil { t.Fatal(err) } @@ -157,6 +161,7 @@ func TestClient_RtolTransfer_sandbox(t *testing.T) { tdata *test.Data inquiryReq *RtolInquiry inquiryRes *RtolInquiryResponse + transferReq *RtolTransfer transferRes *RtolTransferResponse ) @@ -175,7 +180,9 @@ func TestClient_RtolTransfer_sandbox(t *testing.T) { t.Fatal(err) } - transferRes, err = testClient.RtolTransfer(inquiryReq, inquiryRes) + transferReq = NewRtolTransfer(inquiryReq, inquiryRes) + + transferRes, err = testClient.RtolTransfer(transferReq) if err != nil { t.Fatal(err) } |
