using System.Net; using FluentAssertions; using Microsoft.AspNetCore.Mvc.Testing; using Xunit; namespace OrderService.FunctionalTests.Controllers; /// /// EN: Functional tests for health check endpoints. /// VI: Functional tests cho các endpoint kiểm tra sức khỏe. /// public class HealthChecksControllerTests : IClassFixture { private readonly HttpClient _client; public HealthChecksControllerTests(CustomWebApplicationFactory factory) { _client = factory.CreateClient(new WebApplicationFactoryClientOptions { AllowAutoRedirect = false, }); } [Fact] public async Task LiveHealthCheck_ShouldReturnOk() { // Act var response = await _client.GetAsync("/health/live"); // Assert response.StatusCode.Should().Be(HttpStatusCode.OK); } }