コード例 #1
0
        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);
        }
コード例 #2
0
        public async Task <IActionResult> GetManagerByUserIdAsync([FromRoute] string id)
        {
            var result = await _activeDirectoryService.GetManagerByUserIdAsync(id);

            return(Ok(result));
        }