public void GetBodyAttribute_Throws() { HttpRequestMessage request = new HttpRequestMessage(); HttpMessage message = new HttpMessage(request); ExceptionAssert.Throws( typeof(NotSupportedException), "HttpMessage.GetBodyAttribute should have thrown because body attributes don't apply.", () => { message.GetBodyAttribute("localName", "nameSpace"); }); }
public void GetBodyAttribute_Throws() { HttpRequestMessage request = new HttpRequestMessage(); HttpMessage message = new HttpMessage(request); ExceptionAssert.Throws<NotSupportedException>( SR.MessageReadWriteCopyNotSupported("ToHttpRequestMessage", "ToHttpResponseMessage", typeof(Message).FullName), () => { message.GetBodyAttribute("localName", "nameSpace"); }); }