31 lines
783 B
C#
31 lines
783 B
C#
using System.Collections.Generic;
|
|
using System.Net;
|
|
using System.Net.Http.Headers;
|
|
using System.Net.Http.Json;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc.Testing;
|
|
using TestWeb.Infra;
|
|
using TestWeb.Core.WeatherForecasts;
|
|
|
|
namespace TestWeb.Tests.Core.WeatherForecasts;
|
|
|
|
public class WeatherForecastModuleTests : IClassFixture<TestFixture>
|
|
{
|
|
private readonly HttpClient client;
|
|
|
|
public WeatherForecastModuleTests(TestFixture fixture)
|
|
{
|
|
client = fixture.Client;
|
|
}
|
|
|
|
[Fact]
|
|
public async Task Base()
|
|
{
|
|
// Get
|
|
var getCall = await client.GetAsync(
|
|
WeatherForecastModule.Prefix,
|
|
TestContext.Current.CancellationToken
|
|
);
|
|
Assert.Equal(HttpStatusCode.OK, getCall.StatusCode);
|
|
}
|
|
}
|