-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplicationTest.cs
More file actions
29 lines (25 loc) · 854 Bytes
/
ApplicationTest.cs
File metadata and controls
29 lines (25 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Net.Http.Json;
using System.Text.Json;
using System.Text.Json.Serialization;
using AwesomeAssertions;
using Microsoft.AspNetCore.Mvc.Testing;
using TransformerBeeClient.Model;
namespace ExampleAspNetCoreApplication.Test;
public class ApplicationTest : IClassFixture<WebApplicationFactory<Program>>
{
protected readonly WebApplicationFactory<Program> Factory;
public ApplicationTest(WebApplicationFactory<Program> factory)
{
Factory = factory;
}
[Fact]
public async Task Test_That_Setup_Works_As_Designed()
{
var client = Factory.CreateDefaultClient();
var bo4e = await client.GetFromJsonAsync<BOneyComb>(
"/talkToTransformerBee",
new JsonSerializerOptions { Converters = { new JsonStringEnumConverter() } }
);
bo4e.Should().NotBeNull();
}
}