wabbajack/Wabbajack.Common.Test/HttpClientTests.cs

18 lines
504 B
C#
Raw Normal View History

2020-02-15 23:28:20 +00:00
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
2020-02-15 23:28:20 +00:00
namespace Wabbajack.Common.Test
2020-02-15 23:28:20 +00:00
{
public class HttpClientTests
{
[Fact]
2020-02-15 23:28:20 +00:00
public async Task DoesntReuseHttpMessages()
{
var client = new Common.Http.Client();
// If we reuse the HTTP message this will throw a invalid operation exception
await Assert.ThrowsAsync<HttpRequestException>(async () => await client.GetAsync("http://blerg.blaz.bloz.buz"));
2020-02-15 23:28:20 +00:00
}
}
}