DD.WellWorkover.Cloud/AsbCloudWebApi.Tests/ServicesTests/FileCategoryServiceTest.cs

37 lines
933 B
C#
Raw Normal View History

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()
{
2022-11-15 17:44:48 +05:00
context = TestHelpter.MakeRealTestContext();
context.SaveChanges();
service = new FileCategoryService(context);
}
~FileCategoryServiceTest()
{
}
[Fact]
public async Task GetWellCategoryAsync_return_cnt_file_category()
{
2022-09-13 11:47:12 +05:00
var cnt = (await service.GetWellCaseCategoriesAsync(CancellationToken.None)).Count();
Assert.NotEqual(0, cnt);
}
}
}