CI/CD: build e pubblicazione NuGet su git.fabrizi.software (GitLab self-hosted). GitHub è mirror.
using F2.Testing;
using Xunit;
namespace F2.Testing.Tests
{
/// <summary>
/// Basic configuration
/// </summary>
public class DemoTests : IClassFixture<ServerFixture<Startup>>
{
private readonly ServerFixture<Startup> _testFixure;
private readonly WeatherForecastController _controller;
public DemoTests(ServerFixture<Startup> testFixture)
{
_testFixure = testFixture;
_controller = _testFixure.GetService<WeatherForecastController>();
}
[Fact]
public async Task IsGetWorking()
{
var results = await _testFixure.GetAsync<IEnumerable<WeatherForecast>>("WeatherForecast");
Assert.NotEmpty(results);
}
}
}