You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/modules/docs/test/Volo.Docs.TestBase/Volo/Docs/ProjectRepository_Tests.cs

37 lines
939 B

using System.Threading.Tasks;
using Shouldly;
using Volo.Abp.Modularity;
using Volo.Docs.Projects;
using Xunit;
namespace Volo.Docs
{
public abstract class ProjectRepository_Tests<TStartupModule> : DocsTestBase<TStartupModule>
where TStartupModule : IAbpModule
{
protected readonly IProjectRepository ProjectRepository;
protected ProjectRepository_Tests()
{
ProjectRepository = GetRequiredService<IProjectRepository>(); ;
}
[Fact]
public async Task GetListAsync()
{
var projects = await ProjectRepository.GetListAsync();
projects.Count.ShouldBe(1);
}
[Fact]
public async Task GetByShortNameAsync()
{
var project = await ProjectRepository.GetByShortNameAsync("ABP");
project.ShouldNotBeNull();
project.ShortName.ShouldBe("ABP");
}
}
}