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); }
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)); }
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)); }
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)); }
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); }
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)); }