public void DeserializeRequest_Null_Parameters_Throws() { Message wcfMessage = new HttpRequestMessage().ToMessage(); IDispatchMessageFormatter formatter = new SHttpMessageFormatter(); ExceptionAssert.ThrowsArgumentNull("parameters", () => formatter.DeserializeRequest(wcfMessage, parameters: null)); }
public void DeserializeRequest_Null_Message_Throws() { object[] parameters = new object[] { "hello", 5.0 }; IDispatchMessageFormatter formatter = new SHttpMessageFormatter(); ExceptionAssert.ThrowsArgumentNull("message", () => formatter.DeserializeRequest(/*message*/ null, parameters)); }
public void DeserializeRequest_Null_HttpRequestMessage_Throws() { Message wcfMessage = Message.CreateMessage(MessageVersion.None, "unused"); object[] parameters = new object[] { "hello", 5.0 }; IDispatchMessageFormatter formatter = new SHttpMessageFormatter(); ExceptionAssert.Throws <InvalidOperationException>( SR.HttpMessageFormatterNullMessage(typeof(SHttpMessageFormatter).Name, typeof(HttpRequestMessage).Name, "DeserializeRequest"), () => formatter.DeserializeRequest(wcfMessage, parameters)); }