public MockedHttpServer Build(string baseAddress, Action <HttpSelfHostConfiguration> setup = null)
        {
            var requestBehaviors = new RequestBehaviors(builders.Select(b => b.Build()));
            var handler          = new MockHandler(requestBehaviors);

            return(new MockedHttpServer(handler, baseAddress, setup));
        }
Beispiel #2
0
 public MockHandler(RequestBehaviors requestBehaviors)
 {
     this.requestBehaviors = requestBehaviors;
 }
Beispiel #3
0
 public void Reconfigure(IEnumerable <RequestBehavior> behaviors, bool renew)
 {
     requestBehaviors = renew
         ? new RequestBehaviors(behaviors)
         : new RequestBehaviors(requestBehaviors.Behaviors.Concat(behaviors));
 }
Beispiel #4
0
 public void Reconfigure(IEnumerable <RequestBehavior> behaviors, bool deleteExistingMocks)
 {
     requestBehaviors = deleteExistingMocks
         ? new RequestBehaviors(behaviors)
         : new RequestBehaviors(behaviors.Concat(requestBehaviors.Behaviors));
 }