public void Test_QueryUsers_Excludes_Inactive_By_Default() { var queryUsers = new QueryUsers(); var response = _handler.Handle(queryUsers); response.Result.Items.Count().ShouldBe(2); }
public void Test_QueryUsers_Paging() { var queryUsers = new QueryUsers { Inactive = true, PageNumber = 3, PageSize = 1 }; var response = _handler.Handle(queryUsers); response.Result.Items.Single().Id.ShouldBe(3); }
public void Test_QueryUsers_Includes_Inactive_If_True() { var queryUsers = new QueryUsers { Inactive = true }; var response = _handler.Handle(queryUsers); response.Result.Items.Count().ShouldBe(4); }
private async Task LoadUsers() { var usersReturned = await _userService.Get <List <Model.UserProfile> >(null); foreach (var item in usersReturned) { AllUsers.Add(item); QueryUsers.Add(item); } }
private void SearchUsers(string searchQuery) { QueryUsers.Clear(); foreach (var item in AllUsers) { if (item.Username.ToLower().Contains(searchQuery.ToLower())) { QueryUsers.Add(item); } } }
public async Task <IEnumerable <UserInfoDto> > HandleAsync(QueryUsers query) { var userInfos = await _repository.QueryAsync(); var result = userInfos.Select(c => new UserInfoDto { Id = c.Id, Name = c.Name, Address = c.Address }).ToList(); return(result); }
/// <summary> /// The client should fill the IDs or Names of the users it wants to refresh. /// The server fills the missing parts and sends the message back. /// </summary> /// <param name="queryUsers"></param> public void SendQueryUsers(QueryUsers queryUsers) { Connection.SendControl(PacketType.QueryUsers, queryUsers); }
/// <summary> /// Sent by the server to inform the client to refresh its registered user information. /// </summary> /// <param name="queryUsers"></param> public virtual void QueryUsers(QueryUsers queryUsers) { }
public ActionResult Users(QueryUsers queryUsers) { return(Send(queryUsers, View)); }
public void Test_QueryUsers_Paging() { var queryUsers = new QueryUsers { Inactive = true, PageNumber = 3, PageSize = 1 }; var response = _handler.Handle(queryUsers); response.Result.Items.Single().Id.ShouldBe(3); }
public void Test_QueryUsers_Includes_Inactive_If_True() { var queryUsers = new QueryUsers { Inactive = true }; var response = _handler.Handle(queryUsers); response.Result.Items.Count().ShouldBe(4); }
public void Test_QueryUsers_Excludes_Inactive_By_Default() { var queryUsers = new QueryUsers(); var response = _handler.Handle(queryUsers); response.Result.Items.Count().ShouldBe(2); }