This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
DevOpsOpenHack/apis/poi/tests/UnitTests/Utility/HealthCheckTests.cs

34 lines
719 B
C#
Raw Permalink Normal View History

2022-11-03 20:41:13 +00:00
using Xunit;
using poi.Controllers;
using System;
using Microsoft.EntityFrameworkCore;
using poi.Data;
using poi.Models;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using poi.Utility;
using System.Threading;
using Microsoft.Extensions.Diagnostics.HealthChecks;
namespace UnitTests.Utility
{
public class HealthCheckTests
{
[Fact]
public async void CheckHealthAsync_Returns_Result()
{
//arrange
CancellationToken token = new CancellationToken();
HealthCheck healthCheck = new HealthCheck();
//act
HealthCheckResult result = await healthCheck.CheckHealthAsync(null,token);
//assert
Assert.NotNull(result);
}
}
}