예제 #1
0
func TestRpc(t *testing.T) {
	r := rest.New(new(t1))
	testRPC("Get Query.", r, getQReq)
	testRPC("Post Form.", r, postFormReq)
	testRPC("Put JSON.", r, putJSONReq)

	r = rest.New(new(t2))
	testRPC("Put JSON 2.", r, putJSONReq2)
	testRPC("Post MultipartForm.", r, postMultiPartReq)
}
예제 #2
0
func TestResourceMethod(t *testing.T) {
	r := rest.New(new(getOnly))
	testRPC("Get Only.", r, getReq)
	testRPC("Post Not Support.", r, postFormReq)
}