コード例 #1
0
    public async Task DefaultEnvironment_Is_Development()
    {
        // Arrange
        var expected = "Development";

        using var client = new WebApplicationFactory <SimpleWebSiteWithWebApplicationBuilder.Program>().CreateClient();

        // Act
        var content = await client.GetStringAsync("http://localhost/environment");

        // Assert
        Assert.Equal(expected, content);
    }