public void Interceptors_AreCorrectlyInitialized_UsingAnEnumerable(List<MessageInterceptor> interceptors)
 {
     // Exercise system
     var composite = new CompositeMessageInterceptor(interceptors);
     // Verify outcome
     composite.Interceptors.Should().BeEquivalentTo(interceptors);
 }
        public void Interceptors_AreCorrectlyInitialized_UsingAnEnumerable(List <MessageInterceptor> interceptors)
        {
            // Exercise system
            var composite = new CompositeMessageInterceptor(interceptors);

            // Verify outcome
            composite.Interceptors.Should().BeEquivalentTo(interceptors);
        }
 public void InvokesOnException_OnAllInterceptors(ExceptionContext context, CompositeMessageInterceptor composite)
 {
     // Exercise system
     composite.OnException(context);
     // Verify outcome
     foreach (var interceptor in composite.Interceptors)
         Mock.Get(interceptor)
             .Verify(i => i.OnException(context));
 }
 public void InvokesOnSending_OnAllInterceptors(HttpRequestMessage request, CompositeMessageInterceptor composite)
 {
     // Exercise system
     composite.OnSending(request);
     // Verify outcome
     foreach (var interceptor in composite.Interceptors)
         Mock.Get(interceptor)
             .Verify(i => i.OnSending(request));
 }
 public void InvokesOnParsed_OnAllInterceptors(
     ResponseParsedContext<object> context, CompositeMessageInterceptor composite)
 {
     // Exercise system
     composite.OnParsed(context);
     // Verify outcome
     foreach (var interceptor in composite.Interceptors)
         Mock.Get(interceptor)
             .Verify(i => i.OnParsed(context));
 }
 public void InvokesOnException_OnAllInterceptors(ExceptionContext context, CompositeMessageInterceptor composite)
 {
     // Exercise system
     composite.OnException(context);
     // Verify outcome
     foreach (var interceptor in composite.Interceptors)
     {
         Mock.Get(interceptor)
         .Verify(i => i.OnException(context));
     }
 }
 public void InvokesOnSending_OnAllInterceptors(HttpRequestMessage request, CompositeMessageInterceptor composite)
 {
     // Exercise system
     composite.OnSending(request);
     // Verify outcome
     foreach (var interceptor in composite.Interceptors)
     {
         Mock.Get(interceptor)
         .Verify(i => i.OnSending(request));
     }
 }
 public void InvokesOnParsed_OnAllInterceptors(
     ResponseParsedContext <object> context, CompositeMessageInterceptor composite)
 {
     // Exercise system
     composite.OnParsed(context);
     // Verify outcome
     foreach (var interceptor in composite.Interceptors)
     {
         Mock.Get(interceptor)
         .Verify(i => i.OnParsed(context));
     }
 }