Skip to content
33 changes: 0 additions & 33 deletions Activout.RestClient.Test.Json/RestClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,39 +93,6 @@ private IMovieReviewService CreateMovieReviewService(JsonImplementation jsonImpl
.Build<IMovieReviewService>();
}

[Theory]
[InlineData(JsonImplementation.SystemTextJson)]
[InlineData(JsonImplementation.NewtonsoftJson)]
public async Task TestErrorAsyncWithOldTaskConverter(JsonImplementation jsonImplementation)
{
// arrange
ExpectGetAllReviewsAndReturnError();

var reviewSvc = CreateRestClientBuilder(jsonImplementation)
.Accept("application/json")
.ContentType("application/json")
.With(new TaskConverterFactory())
.With(_loggerFactory.CreateLogger<RestClientTests>())
.With(_mockHttp.ToHttpClient())
.BaseUri(BaseUri)
.Build<IMovieReviewService>();

// act
var aggregateException =
await Assert.ThrowsAsync<AggregateException>(() => reviewSvc.GetAllReviews(MovieId));

// assert
_mockHttp.VerifyNoOutstandingExpectation();

Assert.IsType<RestClientException>(aggregateException.InnerException);
var exception = (RestClientException)aggregateException.InnerException!;

Assert.Equal(HttpStatusCode.NotFound, exception.StatusCode);
var error = exception.GetErrorResponse<ErrorResponse>();
Assert.Equal(34, error.Errors[0].Code);
Assert.Equal("Sorry, that page does not exist", error.Errors[0].Message);
}

[Theory]
[InlineData(JsonImplementation.SystemTextJson)]
[InlineData(JsonImplementation.NewtonsoftJson)]
Expand Down
81 changes: 0 additions & 81 deletions Activout.RestClient/Helpers/Implementation/TaskConverter.cs

This file was deleted.

65 changes: 0 additions & 65 deletions Activout.RestClient/Helpers/Implementation/TaskConverter2.cs

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions Activout.RestClient/Helpers/Implementation/TaskConverterFactory.cs

This file was deleted.