Call it mock TestResponse
This commit is contained in:
parent
9d060bf6e1
commit
7739e23401
@ -9,13 +9,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestClient(t *testing.T) {
|
func TestClient(t *testing.T) {
|
||||||
type TestRequest struct {
|
type TestResponse struct {
|
||||||
Param string
|
Param string
|
||||||
}
|
}
|
||||||
|
|
||||||
response := []MockResponse{
|
response := []MockResponse{
|
||||||
{Method: "Foo.Bar", Response: map[string]interface{}{"foo": "bar"}},
|
{Method: "Foo.Bar", Response: map[string]interface{}{"foo": "bar"}},
|
||||||
{Method: "Foo.Struct", Response: &TestRequest{Param: "aparam"}},
|
{Method: "Foo.Struct", Response: &TestResponse{Param: "aparam"}},
|
||||||
{Method: "Foo.Fail", Error: errors.InternalServerError("go.mock", "failed")},
|
{Method: "Foo.Fail", Error: errors.InternalServerError("go.mock", "failed")},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user