示例#1
0
        private IBroker CreateMockBroker()
        {
            IBroker mockBroker = Substitute.For <IBroker>();

            mockBroker.CanInvokeBroker(null).ReturnsForAnyArgs(true);
            mockBroker.AcquireTokenUsingBrokerAsync(null).ReturnsForAnyArgs(TestConstants.CreateMsalTokenResponse());
            return(mockBroker);
        }
示例#2
0
        private async Task <MsalTokenResponse> SendAndVerifyResponseAsync()
        {
            CreateRequestParametersForBroker();

            MsalTokenResponse msalTokenResponse =
                await Broker.AcquireTokenUsingBrokerAsync(_brokerPayload).ConfigureAwait(false);

            ValidateResponseFromBroker(msalTokenResponse);
            return(msalTokenResponse);
        }