INNER CODE UNIT · C#

HealthCheckControllerTests

ttu/dotnet-fake-json-server · FakeServer.Test/HealthCheckControllerTests.cs:10

public class HealthCheckControllerTests
{
    private readonly IDataStore _mockDataStore;
    private readonly HealthCheckController _controller;

    public HealthCheckControllerTests()
    {
        _mockDataStore = Substitute.For<IDataStore>();
        _controller = new HealthCheckController(_mockDataStore);
    }

    [Fact]
    public void Get_ReturnsHealthyStatus_WhenDataStoreIsAccessible()
    {
        // Arrange
        // For the healthy case, we just need to ensure Reload() doesn't throw an exception
        // This is the default behavior for NSubstitute, so no explicit configuration is needed

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…