mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 04:48:17 +08:00
removed some code we dont need as not expecting any errors so should just throw an exception to the global handler
This commit is contained in:
@ -62,19 +62,11 @@ namespace Ocelot.UnitTests.Responder
|
||||
{
|
||||
this.Given(x => x.GivenTheHttpResponseMessageIs(new HttpResponseMessage()))
|
||||
.And(x => x.GivenThereAreNoPipelineErrors())
|
||||
.And(x => x.GivenTheResponderReturns())
|
||||
.When(x => x.WhenICallTheMiddleware())
|
||||
.Then(x => x.ThenThereAreNoErrors())
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
private void GivenTheResponderReturns()
|
||||
{
|
||||
_responder
|
||||
.Setup(x => x.SetResponseOnHttpContext(It.IsAny<HttpContext>(), It.IsAny<HttpResponseMessage>()))
|
||||
.ReturnsAsync(new OkResponse());
|
||||
}
|
||||
|
||||
private void GivenThereAreNoPipelineErrors()
|
||||
{
|
||||
_scopedRepository
|
||||
|
Reference in New Issue
Block a user