コード例 #1
0
        public void GetAuthResults_sendRequestWithRelyingPartyId_success()
        {
            AuthenticationResultsRequest authenticationResultsRequest = AuthenticationResultsRequest.Create(RELYING_PARTY_ID);
            String authenticationResultsResponseString = jsonService.SerializeToJson(authenticationResults);
            AuthenticationResultsRequest expectedAuthenticationResultsRequest = AuthenticationResultsRequest.Create();

            StartMockServer(expectedAuthenticationResultsRequest, (int)HttpStatusCode.OK, authenticationResultsResponseString);
            List <AuthenticationResult> response = authenticationClient.GetResults(authenticationResultsRequest);

            Assert.AreEqual(REFERENCE, response[0].AuthRef);
        }
コード例 #2
0
        public void GetAuthenticationResultsRelyingPartyIdNotNull_success()
        {
            AuthenticationResultsRequest authenticationResultsRequest = AuthenticationResultsRequest.Create(CommonTestData.RELYING_PARTY_ID);

            GetAuthenticationResults(authenticationResultsRequest, TransactionContext.ORGANISATIONAL, CommonTestData.RELYING_PARTY_ID);
        }
コード例 #3
0
        public void GetAuthenticationResultsRelyingPartyIdNull_success()
        {
            AuthenticationResultsRequest authenticationResultsRequest = AuthenticationResultsRequest.Create();

            GetAuthenticationResults(authenticationResultsRequest, TransactionContext.PERSONAL, null);
        }
コード例 #4
0
        public void GetResults_relyingPartyIdEmpty_expectError()
        {
            AuthenticationResultsRequest authenticationResultsRequest = AuthenticationResultsRequest.Create("");

            ValidateRequest_expectError("RelyingPartyId cannot be empty.", () => authenticationClient.GetResults(authenticationResultsRequest));
        }