DD.WellWorkover.Cloud/AsbCloudWebApi.Tests/ServicesTests/FileCategoryServiceTest.cs
2022-11-18 16:20:12 +05:00

35 lines
889 B
C#

using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace AsbCloudWebApi.Tests.ServicesTests
{
public class FileCategoryServiceTest
{
private readonly AsbCloudDbContext context;
private FileCategoryService service;
public FileCategoryServiceTest()
{
context = TestHelpter.MakeRealTestContext();
context.SaveChanges();
service = new FileCategoryService(context, TestHelpter.MemoryCache);
}
~FileCategoryServiceTest()
{
}
[Fact]
public async Task GetWellCategoryAsync_return_cnt_file_category()
{
var cnt = (await service.GetWellCaseCategoriesAsync(CancellationToken.None)).Count();
Assert.NotEqual(0, cnt);
}
}
}