コード例 #1
0
        public void GetUsersAndGroups_Should_InvokeRemoteGraphService_Once()
        {
            var query = "bayer";

            _activeDirectoryService.FindUsersAndGroupsAsync(query);
            _mockRemoteGraphService.Verify(x => x.FindActiveUserAsync(query), Times.Once);
            _mockRemoteGraphService.Verify(x => x.FindGroupAsync(query), Times.Once);
        }
コード例 #2
0
        public IActionResult FindUsersAndGroupsAsync([FromQuery(Name = "q")] string query)
        {
            var result = _activeDirectoryService.FindUsersAndGroupsAsync(query);

            return(Ok(result));
        }