public void AuthenticateCharityUser_ValidUser_ReturnsIsValidAndCharityId(WireDataFormat format)
        {
            var client        = TestContext.CreateClientNoCredentials(format);
            var charityClient = new CharityApi(client.HttpChannel);
            var authenticateCharityUserRequest = new AuthenticateCharityUserRequest()
            {
                Username = TestContext.CharityTestUserName,
                Password = TestContext.CharityTestUserPassword,
                Pin      = TestContext.CharityTestUserPin
            };
            var response = charityClient.Authenticate(authenticateCharityUserRequest);

            Assert.That(response.IsValid, Is.True);
        }
Exemplo n.º 2
0
        public void AuthenticateAsync(AuthenticateCharityUserRequest request, Action <CharityAuthenticationResult> callback)
        {
            var locationFormat = RetrieveAuthenticationLocationFormat();

            HttpChannel.PerformRequestAsync("POST", locationFormat, callback);
        }
Exemplo n.º 3
0
        public CharityAuthenticationResult Authenticate(AuthenticateCharityUserRequest request)
        {
            var locationFormat = RetrieveAuthenticationLocationFormat();

            return(HttpChannel.PerformRequest <AuthenticateCharityUserRequest, CharityAuthenticationResult>("POST", locationFormat, request));
        }