Beispiel #1
0
        /// <summary>
        /// Sets up the channel to spoil the messages (for fault tests)
        /// </summary>
        /// <param name="spoiler">Object to process the message.</param>
        protected void SetBreakingBehaviour(ServiceEndpoint endpoint, MessageSpoiler spoiler)
        {
            Binding binding = endpoint.Binding;

            TestTool.HttpTransport.HttpTransportBindingElement traceElement = (HttpTransport.HttpTransportBindingElement)binding.CreateBindingElements()[1];

            if (spoiler != null)
            {
                traceElement.Contollers.Add(spoiler);
            }
            else
            {
                traceElement.Contollers.RemoveAll(c => c is ISoapMessageMutator);
            }
        }
Beispiel #2
0
 protected HttpTransportBindingElement(HttpTransportBindingElement other)
     : base(other)
 {
     _controllers = other._controllers;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes binding elements.
 /// </summary>
 void Initialize()
 {
     _transport = new HttpTransportBindingElement(_controllers);
     _encoding  = new TextMessageEncodingBindingElement();
 }