http error code tests and docs

This commit is contained in:
TomPallister
2020-04-11 18:46:19 +01:00
parent 3dfcff822b
commit cdbd8e85d3
6 changed files with 29 additions and 6 deletions

View File

@ -7,6 +7,7 @@
using Shouldly;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
@ -38,6 +39,14 @@
error.ShouldBeOfType<RequestCanceledError>();
}
[Fact]
public void should_return_ConnectionToDownstreamServiceError()
{
var error = _mapper.Map(new HttpRequestException());
error.ShouldBeOfType<ConnectionToDownstreamServiceError>();
}
[Fact]
public void should_return_request_canceled_for_subtype()
{