示例#1
0
        public async Task Should_Find_By_Ids()
        {
            var command = UserViewModelFaker.GenerateUserViewModel().Generate();
            await _userAppService.Register(command);

            command = UserViewModelFaker.GenerateUserViewModel().Generate();
            await _userAppService.Register(command);

            var users = _database.Users.Select(s => s.Id).ToArray();


            var search = new UserSearch <TKey>()
            {
                Id = users
            };

            var usersFound = await _userManagerAppService.Search(search);

            usersFound.Total.Should().BeGreaterOrEqualTo(1);
            usersFound.Collection.ToList().Count.Should().Be(usersFound.Total);
        }