コード例 #1
0
        public async Task GetAccountUsers_VerifyProviderAgreementIsReturned()
        {
            var fixture = new WhenCallingPasAccountApiClientFixture().SetupResponseForGetAgreement();
            var result  = await fixture.PasAccountApiClient.GetAgreement(fixture.ProviderId, CancellationToken.None);

            Assert.AreEqual(fixture.ProviderAgreementStatus, result.Status);
        }
コード例 #2
0
        public async Task GetAgreement_VerifyUrlAndDataIsCorrectPassedIn()
        {
            var fixture = new WhenCallingPasAccountApiClientFixture();
            await fixture.PasAccountApiClient.GetAgreement(fixture.ProviderId, CancellationToken.None);

            fixture.MockRestHttpClient.Verify(x => x.Get <ProviderAgreement>($"api/account/{fixture.ProviderId}/agreement", null, CancellationToken.None));
        }
コード例 #3
0
        public async Task SendEmailToAllProviderRecipients_VerifyUrlAndDataIsCorrectPassedIn()
        {
            var fixture = new WhenCallingPasAccountApiClientFixture();
            await fixture.PasAccountApiClient.SendEmailToAllProviderRecipients(fixture.ProviderId, fixture.ProviderEmailRequest, CancellationToken.None);

            fixture.MockRestHttpClient.Verify(x => x.PostAsJson <ProviderEmailRequest>($"api/email/{fixture.ProviderId}/send", fixture.ProviderEmailRequest, CancellationToken.None));
        }
コード例 #4
0
        public async Task GetAccountUsers_VerifyUrlAndDataIsCorrectPassedIn()
        {
            var fixture = new WhenCallingPasAccountApiClientFixture();
            await fixture.PasAccountApiClient.GetAccountUsers(fixture.ProviderId, CancellationToken.None);

            fixture.MockRestHttpClient.Verify(x => x.Get <IEnumerable <User> >($"api/account/{fixture.ProviderId}/users", null, CancellationToken.None));
        }
コード例 #5
0
        public async Task GetUserRef_VerifyUserIsReturned()
        {
            var fixture = new WhenCallingPasAccountApiClientFixture().SetupResponseForGetUser();
            var result  = await fixture.PasAccountApiClient.GetUser(fixture.UserRef, CancellationToken.None);

            Assert.AreEqual(fixture.User, result);
        }
コード例 #6
0
        public async Task GetUserRef_VerifyUrlAndDataIsCorrectPassedIn()
        {
            var fixture = new WhenCallingPasAccountApiClientFixture();
            await fixture.PasAccountApiClient.GetUser(fixture.UserRef, CancellationToken.None);

            fixture.MockRestHttpClient.Verify(x => x.Get <User>($"api/user/{fixture.UserRef}", null, CancellationToken.None));
        }