public async Task SubscriptionWebhook([FromBody] MicrosoftWebhookPayload payload) { // ToDo: Perform the changes described in the payload on your user's account // Alternative: Get the full operation for more details var operation = await service.GetOperationStatus(payload.SubscriptionId, payload.OperationId); await service.UpdateOperationStatus(payload.SubscriptionId, payload.OperationId, "Success"); }
public void GetOperationStatus_MockApiTest() { Task.Run(async() => { // mock subscription id: 37f9dea2-4345-438f-b0bd-03d40d28c7e0 var result = await _fixture.GetOperationStatus("37f9dea2-4345-438f-b0bd-03d40d28c7e0", "74dfb4db-c193-4891-827d-eb05fbdc64b0"); Assert.NotNull(result); }).GetAwaiter().GetResult(); }