public void DeleteEnvironmentAsyncSuccess()
        {
            string expectedEnvironmentName = Guid.NewGuid().ToString();
            string expectedRequestUri      = $"https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/{expectedEnvironmentName}?api-version=2018-01-01";

            HttpRequestMessage expectedRequest = TestHelper.CreateHttpRequest(
                HttpMethod.Delete,
                expectedRequestUri);

            _httpClient.RegisterExpectedRequest(new ExpectedRequest(expectedRequest));

            HttpResponseMessage expectedResponse = TestHelper.CreateHttpResponse(
                HttpStatusCode.Accepted,
                null,
                null,
                "application/json",
                null);

            _httpClient.RegisterExpectedResponse(
                expectedRequestUri,
                new ExpectedResponse(expectedResponse));

            IPowerAppsClient client = new PowerAppsClient(_tokenProvider);

            AzureResponseBase response = client.DeleteEnvironmentAsync(expectedEnvironmentName).Result;

            Assert.IsNotNull(response, "The response should not be null!");
        }
        private object RemovePowerAppsEnvironmentAsync(OperationRunner context)
        {
            PowerAppsClient client = new PowerAppsClient(WizardContext.TokenProvider);

            client.SetLogger(context.Logger);

            return(client.DeleteEnvironmentAsync(DataModel.InstallationConfiguration.PowerApps.SelectedEnvironment.EnvironmentName).Result);
        }