Add tests/TarninaHub.Tests with health controller and SurrealDB endpoint builder tests, and register the test and layer projects in the solution.
20 lines
475 B
C#
20 lines
475 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using TarninaHub.Controllers;
|
|
|
|
namespace TarninaHub.Tests.Controllers;
|
|
|
|
public class HealthControllerTests
|
|
{
|
|
[Fact]
|
|
public void Get_ReturnsOkWithHealthyStatus()
|
|
{
|
|
var controller = new HealthController();
|
|
|
|
var result = controller.Get();
|
|
|
|
var ok = Assert.IsType<OkObjectResult>(result.Result);
|
|
var payload = Assert.IsType<HealthResponse>(ok.Value);
|
|
Assert.Equal("ok", payload.Status);
|
|
}
|
|
}
|