We have written a restful service using WCF and are now trying to write FitNesse tests to verify the behaviour of this service.
One test is that a 404 status code is returned if a resource can not be found.
The problem is that we can not find a mechanism for consuming the service that allows us to get the status code of the incomming response. Everything seems to work fine for everything other than 200. We have tried using HttpWebRequest
and HttpWebResponse
and the WebChannelFactory all of which throw exceptions of various types depending on the HttpStatusCode returned by the service.
Why can't I see the status code???!!