public async Task GetUsers_Should_InvokeRemoteGraphServiceSearchUser_Once() { var query = "Peter"; await _activeDirectoryService.FindUsersAsync(query); _mockRemoteGraphService.Verify(x => x.FindActiveUserAsync(query), Times.Once); }
public async Task <IActionResult> FindUsersAsync([FromQuery(Name = "q")] string query) { var result = await _activeDirectoryService.FindUsersAsync(query); return(Ok(result)); }