func TestRequests(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	servers := newServers(assert, 12345, 12346, 12346)
	// Run the tests.
	for i, test := range tests {
		assert.Logf("test #%d: %s", i, test.name)
		caller, err := servers.Caller("testing")
		assert.Nil(err)
		var response request.Response
		switch test.method {
		case "GET":
			response, err = caller.Get(test.resource, test.id, test.params)
		case "HEAD":
			response, err = caller.Head(test.resource, test.id, test.params)
		case "PUT":
			response, err = caller.Put(test.resource, test.id, test.params)
		case "POST":
			response, err = caller.Post(test.resource, test.id, test.params)
		case "PATCH":
			response, err = caller.Patch(test.resource, test.id, test.params)
		case "DELETE":
			response, err = caller.Delete(test.resource, test.id, test.params)
		case "OPTIONS":
			response, err = caller.Options(test.resource, test.id, test.params)
		default:
			assert.Fail("illegal method", test.method)
		}
		assert.Nil(err)
		if test.show {
			assert.Logf("response: %#v", response)
		}
		test.check(assert, response)
	}
}
// TestRequests runs the different request tests.
TestRequests runs the different request tests.
// TestRequests runs the different request tests .
func TestRequests(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	servers := newServers(assert, 12345, 12346, 12346)
	for i, test := range tests {
		assert.Logf("test #%d: %s", i, test.name)
		caller, err := servers.Caller("testing")
		assert.Nil(err)
		var response request.Response
		switch test.method {
		case "GET":
			response, err = caller.Get(test.resource, test.id, test.params)
		case "HEAD":
			response, err = caller.Head(test.resource, test.id, test.params)
		case "PUT":
			response, err = caller.Put(test.resource, test.id, test.params)
		case "POST":
			response, err = caller.Post(test.resource, test.id, test.params)
		case "PATCH":
			response, err = caller.Patch(test.resource, test.id, test.params)
		case "DELETE":
			response, err = caller.Delete(test.resource, test.id, test.params)
		case "OPTIONS":
			response, err = caller.Options(test.resource, test.id, test.params)
		default:
			assert.Fail("illegal method", test.method)
		}
		assert.Nil(err)
		if test.show {
			assert.Logf("response: %#v", response)
		}
		test.check(assert, response)
	}
}
func TestRequests ( t * testing . T ) { assert := audit . NewTestingAssertion ( t , true ) servers := newServers ( assert , 12345 , 12346 , 12346 ) for i , test := range tests { assert . Logf ( " " , i , test . name ) caller , err := servers . Caller ( " " ) assert . Nil ( err ) var response request . Response switch test . method { case " " : response , err = caller . Get ( test . resource , test . id , test . params ) case " " : response , err = caller . Head ( test . resource , test . id , test . params ) case " " : response , err = caller . Put ( test . resource , test . id , test . params ) case " " : response , err = caller . Post ( test . resource , test . id , test . params ) case " " : response , err = caller . Patch ( test . resource , test . id , test . params ) case " " : response , err = caller . Delete ( test . resource , test . id , test . params ) case " " : response , err = caller . Options ( test . resource , test . id , test . params ) default : assert . Fail ( " " , test . method ) } assert . Nil ( err ) if test . show { assert . Logf ( " " , response ) } test . check ( assert , response ) } }
TestRequests runs the different request tests.
TestRequests runs the different request tests .
// Run the tests.