public async Task WhenAuthorizingAdditionalRecordsBeforeFirstAuth_ThenInvalidOperationExceptionThrown() { SetupEmptyLocalStore(); HealthVaultSodaConnection healthVaultSodaConnection = CreateHealthVaultSodaConnection(); await healthVaultSodaConnection.AuthorizeAdditionalRecordsAsync(); }
public async Task WhenAuthorizingAdditionalRecords_ThenShellAuthServiceInvoked() { SetupLocalStore(); var responseMessage = GenerateResponseMessage("GetAuthorizedPeopleResult.xml"); _subHealthWebRequestClient .SendAsync( new Uri("https://platform.healthvault-ppe.com/platform/wildcat.ashx"), Arg.Any <byte[]>(), Arg.Any <int>(), Arg.Any <IDictionary <string, string> >(), Arg.Any <CancellationToken>()) .Returns(responseMessage); HealthVaultSodaConnection healthVaultSodaConnection = CreateHealthVaultSodaConnection(); await healthVaultSodaConnection.AuthorizeAdditionalRecordsAsync(); await _subShellAuthService.Received() .AuthorizeAdditionalRecordsAsync(new Uri("https://account.healthvault-ppe.com/"), new Guid(ApplicationInstanceId)); await _subLocalObjectStore.Received() .WriteAsync(HealthVaultSodaConnection.PersonInfoKey, Arg.Any <object>()); }