/
aprogrammer
/
ACme.BookStore
Обзор
Документация
Войти
/
aprogrammer
/
ACme.BookStore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/ACme.BookStore.Application.Tests/Samples/SampleAppServiceTests.cs
32 строки
884 B
nicolaujoao1
Add project files.
29 сен 2022, 16:22
29 сен 2022, 16:22
e371a9d
Код
Авторство
О чём код?
using Shouldly; using System.Threading.Tasks; using Volo.Abp.Identity; using Xunit; namespace ACme.BookStore.Samples; /* This is just an example test class. * Normally, you don't test code of the modules you are using * (like IIdentityUserAppService here). * Only test your own application services. */ public class SampleAppServiceTests : BookStoreApplicationTestBase { private readonly IIdentityUserAppService _userAppService; public SampleAppServiceTests() { _userAppService = GetRequiredService<IIdentityUserAppService>(); } [Fact] public async Task Initial_Data_Should_Contain_Admin_User() { //Act var result = await _userAppService.GetListAsync(new GetIdentityUsersInput()); //Assert result.TotalCount.ShouldBeGreaterThan(0); result.Items.ShouldContain(u => u.UserName == "admin"); } }