Beispiel #1
0
 protected override async Task When()
 {
     try
     {
         var request = new RequestThatWillThrow();
         _response = await Bus.Request(request);
     }
     catch (RequestFailedException exc)
     {
         _exception = exc;
     }
 }
 protected override async Task When()
 {
     try
     {
         var request = new RequestThatWillThrow();
         _response = await Bus.Request(request);
     }
     catch (RequestFailedException exc)
     {
         _exception = exc;
     }
 }
 public override async Task WhenAsync()
 {
     try
     {
         var request = new RequestThatWillThrow();
         _response = await Subject.Request(request);
     }
     catch (RequestFailedException exc)
     {
         _exception = exc;
     }
 }
        public override async Task When(ITestHarnessBusFactory busFactory)
        {
            _response = null;
            _exception = null;

            var bus = busFactory.Create();

            try
            {
                var request = new RequestThatWillThrow();
                _response = await bus.Request(request);
            }
            catch (RequestFailedException exc)
            {
                _exception = exc;
            }
        }