コード例 #1
0
        public void GetUserOrGroup_Should_InvokeRemoteGraphService_Once()
        {
            var id = "*****@*****.**";

            _activeDirectoryService.GetUserOrGroupAsync(id);
            _mockRemoteGraphService.Verify(x => x.GetUserAsync(id), Times.Once);
            _mockRemoteGraphService.Verify(x => x.GetGroupAsync(id), Times.Once);
        }
コード例 #2
0
        public IActionResult GetUserOrGroupAsync([FromRoute] string id)
        {
            var result = _activeDirectoryService.GetUserOrGroupAsync(id);

            return(Ok(result));
        }