/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package software.amazon.cloudformation.stackinstances; import software.amazon.cloudformation.proxy.AmazonWebServicesClientProxy; import software.amazon.cloudformation.proxy.Logger; import software.amazon.cloudformation.proxy.OperationStatus; import software.amazon.cloudformation.proxy.ProgressEvent; import software.amazon.cloudformation.proxy.ResourceHandlerRequest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; @ExtendWith(MockitoExtension.class) public class DeleteHandlerTest { @Mock private AmazonWebServicesClientProxy proxy; @Mock private Logger logger; @BeforeEach public void setup() { proxy = mock(AmazonWebServicesClientProxy.class); logger = mock(Logger.class); } // @Test // public void handleRequest_SimpleSuccess() { // final DeleteHandler handler = new DeleteHandler(); // // final ResourceModel model = ResourceModel.builder().build(); // // final ResourceHandlerRequest request = ResourceHandlerRequest.builder() // .desiredResourceState(model) // .build(); // // final ProgressEvent response // = handler.handleRequest(proxy, request, null, logger); // // assertThat(response).isNotNull(); // assertThat(response.getStatus()).isEqualTo(OperationStatus.SUCCESS); // assertThat(response.getCallbackContext()).isNull(); // assertThat(response.getCallbackDelaySeconds()).isEqualTo(0); // assertThat(response.getResourceModel()).isEqualTo(request.getDesiredResourceState()); // assertThat(response.getResourceModels()).isNull(); // assertThat(response.getMessage()).isNull(); // assertThat(response.getErrorCode()).isNull(); // } }