Documentation ¶
Index ¶
- func DoRequest(ts *TestCase, vars map[string]interface{}) (c *gin.Context, r *http.Request, w *httptest.ResponseRecorder)
- func Exec(t *testing.T, cs []TestCase)
- func ExecWithVars(t *testing.T, cs []TestCase, vars map[string]interface{})
- func MakeGetRequest(uri string, param url.Values) (r *http.Request)
- func MakePostJSONRequest(uri string, data map[string]interface{}) (r *http.Request)
- func MakePostRequest(uri string, param url.Values) (r *http.Request)
- func MergeMap(mObj ...map[string]interface{}) map[string]interface{}
- func NewBufferString(body string) io.Reader
- func RegisterInitCallback(cb InitCallback)
- type InitCallback
- type TestCallback
- type TestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoRequest ¶
func DoRequest(ts *TestCase, vars map[string]interface{}) (c *gin.Context, r *http.Request, w *httptest.ResponseRecorder)
具体的每一个请求
func ExecWithVars ¶ added in v0.1.3
执行 测试
func MakePostJSONRequest ¶
func NewBufferString ¶
func RegisterInitCallback ¶
func RegisterInitCallback(cb InitCallback)
Types ¶
type InitCallback ¶
type TestCallback ¶
type TestCallback struct {
Init InitCallback
}
Click to show internal directories.
Click to hide internal directories.