private async Task TestResourcesV2(OdsApiSettings settings) { var client = _odsApiClientFactory.NewResourcesClient(settings); var sampleIntervention = await CreateSampleInterventionV2(client); var postResponse = await client.Post("interventions", sampleIntervention); var createdInterventionId = await client.HandleHttpResponseGetCreatedResourceId(postResponse); var deleteResponse = await client.Delete($"interventions/{createdInterventionId}"); await client.HandleHttpResponse(deleteResponse); }
public async Task <OdsApiClient> NewResourcesClient() { var odsApiSettings = await _odsApiSettingsProvider.GetOdsApiSettings(); return(_odsApiClientFactory.NewResourcesClient(odsApiSettings)); }