Ejemplo n.º 1
0
        public void BeforeSendReply_Null_Message_Throws()
        {
            IDispatchMessageInspector inspector = new SHttpMessageInspector();
            Message wcfMessage = null;

            ExceptionAssert.ThrowsArgumentNull("reply", () => inspector.BeforeSendReply(ref wcfMessage, correlationState: null));
        }
Ejemplo n.º 2
0
        public void BeforeSendReply_Null_HttpResponseMessage_Throws()
        {
            IDispatchMessageInspector inspector = new SHttpMessageInspector();
            Message wcfMessage = Message.CreateMessage(MessageVersion.None, "unused");

            ExceptionAssert.Throws <InvalidOperationException>(
                SR.HttpMessageInspectorNullMessage(typeof(SHttpMessageInspector).Name, typeof(HttpResponseMessage).Name, "BeforeSendReply"),
                () => inspector.BeforeSendReply(ref wcfMessage, correlationState: null));
        }
Ejemplo n.º 3
0
        public void BeforeSendReply_HttpMessageInspector_Null_Message_Throws()
        {
            HttpMessageInspector inspector = new SHttpMessageInspector();

            ExceptionAssert.ThrowsArgumentNull("response", () => inspector.BeforeSendReply(null, "correlationState"));
        }