public async Task GetManagerByUserId_Should_InvokeRemoteGraphServiceGetManagerIdOfUser_Once(string id) { await _activeDirectoryService.GetManagerByUserIdAsync(id); _mockRemoteGraphService.Verify(x => x.GetManagerIdOfUserAsync(id), Times.Once); _mockRemoteGraphService.Verify(x => x.GetUserAsync(_managerId), Times.Once); }
public async Task <IActionResult> GetManagerByUserIdAsync([FromRoute] string id) { var result = await _activeDirectoryService.GetManagerByUserIdAsync(id); return(Ok(result)); }