func TestGetXML(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	// Setup the test server.
	mux := newMultiplexer(assert)
	ts := restaudit.StartServer(mux, assert)
	defer ts.Close()
	err := mux.Register("test", "xml", NewTestHandler("xml", assert))
	assert.Nil(err)
	// Perform test requests.
	req := restaudit.NewRequest("GET", "/base/test/xml/4711")
	req.AddHeader(restaudit.HeaderAccept, restaudit.ApplicationXML)
	resp := ts.DoRequest(req)
	resp.AssertStatusEquals(200)
	resp.AssertBodyContains(`<ResourceID>4711</ResourceID>`)
}
// TestGetXML tests the GET command with an XML result.
TestGetXML tests the GET command with an XML result.
// TestGetXML tests the GET command with an XML result .
func TestGetXML(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	mux := newMultiplexer(assert)
	ts := restaudit.StartServer(mux, assert)
	defer ts.Close()
	err := mux.Register("test", "xml", NewTestHandler("xml", assert))
	assert.Nil(err)
	req := restaudit.NewRequest("GET", "/base/test/xml/4711")
	req.AddHeader(restaudit.HeaderAccept, restaudit.ApplicationXML)
	resp := ts.DoRequest(req)
	resp.AssertStatusEquals(200)
	resp.AssertBodyContains(`<ResourceID>4711</ResourceID>`)
}
func TestGetXML ( t * testing . T ) { assert := audit . NewTestingAssertion ( t , true ) mux := newMultiplexer ( assert ) ts := restaudit . StartServer ( mux , assert ) defer ts . Close ( ) err := mux . Register ( " " , " " , NewTestHandler ( " " , assert ) ) assert . Nil ( err ) req := restaudit . NewRequest ( " " , " " ) req . AddHeader ( restaudit . HeaderAccept , restaudit . ApplicationXML ) resp := ts . DoRequest ( req ) resp . AssertStatusEquals ( 200 ) resp . AssertBodyContains ( `<ResourceID>4711</ResourceID>` ) }
TestGetXML tests the GET command with an XML result.
TestGetXML tests the GET command with an XML result .
// Setup the test server. // Perform test requests.