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

37 lines
923 B
C#

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.GetWellCategoryAsync(CancellationToken.None)).Count();
Assert.NotEqual(0, cnt);
}
}
}