using AsbCloudApp.Data; using AsbCloudDb.Model; using AsbCloudInfrastructure.Services; using AsbCloudInfrastructure.Services.Cache; 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.MakeTestContext(); context.SaveChanges(); service = new FileCategoryService(context); } ~FileCategoryServiceTest() { } [Fact] public async Task GetWellCategoryAsync_return_cnt_file_category() { var cnt = (await service.GetWellCaseCategoriesAsync(CancellationToken.None)).Count(); Assert.NotEqual(0, cnt); } } }