(t *testing.T, api client.QueueProtocolAPI)
| 507 | } |
| 508 | |
| 509 | func testQueryTx(t *testing.T, api client.QueueProtocolAPI) { |
| 510 | _, err := api.QueryTx(&types.ReqHash{}) |
| 511 | if err != nil { |
| 512 | t.Error("Call QueryTx Failed.", err) |
| 513 | } |
| 514 | _, err = api.QueryTx(nil) |
| 515 | if err == nil { |
| 516 | t.Error("QueryTx(nil) need return error.") |
| 517 | } |
| 518 | _, err = api.QueryTx(&types.ReqHash{Hash: []byte("case1")}) |
| 519 | if err == nil { |
| 520 | t.Error("QueryTx(&ReqHash{Hash:[]byte(\"case1\")}) need return error.") |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | func testGetTransactionByAddr(t *testing.T, api client.QueueProtocolAPI) { |
| 525 | _, err := api.GetTransactionByAddr(&types.ReqAddr{}) |
no test coverage detected