@Test public void testCreateCreateStackRequestForDatabaseStack() { Collection<Tag> tags = Lists.newArrayList(new Tag().withKey("mytag").withValue("myvalue")); when(awsTaggingService.prepareCloudformationTags(authenticatedContext, databaseStack.getTags())).thenReturn(tags); CreateStackRequest createStackRequest = underTest.createCreateStackRequest(authenticatedContext, databaseStack, "stackName", "template"); assertEquals("stackName", createStackRequest.getStackName()); assertEquals("template", createStackRequest.getTemplateBody()); verify(awsTaggingService).prepareCloudformationTags(authenticatedContext, cloudStack.getTags()); assertEquals(tags, createStackRequest.getTags()); }
public CreateStackRequest createCreateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String subnet, String cfTemplate) { return new CreateStackRequest() .withStackName(cFStackName) .withOnFailure(OnFailure.DO_NOTHING) .withTemplateBody(cfTemplate) .withTags(awsTaggingService.prepareCloudformationTags(ac, stack.getTags())) .withCapabilities(CAPABILITY_IAM) .withParameters(getStackParameters(ac, stack, cFStackName, subnet)); }
AwsStackRequestHelper { public CreateStackRequest createCreateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String subnet, String cfTemplate) { return new CreateStackRequest() .withStackName(cFStackName) .withOnFailure(OnFailure.DO_NOTHING) .withTemplateBody(cfTemplate) .withTags(awsTaggingService.prepareCloudformationTags(ac, stack.getTags())) .withCapabilities(CAPABILITY_IAM) .withParameters(getStackParameters(ac, stack, cFStackName, subnet)); } }
AwsStackRequestHelper { public CreateStackRequest createCreateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String subnet, String cfTemplate) { return new CreateStackRequest() .withStackName(cFStackName) .withOnFailure(OnFailure.DO_NOTHING) .withTemplateBody(cfTemplate) .withTags(awsTaggingService.prepareCloudformationTags(ac, stack.getTags())) .withCapabilities(CAPABILITY_IAM) .withParameters(getStackParameters(ac, stack, cFStackName, subnet)); }  }
AwsStackRequestHelper { public CreateStackRequest createCreateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String subnet, String cfTemplate) { return new CreateStackRequest() .withStackName(cFStackName) .withOnFailure(OnFailure.DO_NOTHING) .withTemplateBody(cfTemplate) .withTags(awsTaggingService.prepareCloudformationTags(ac, stack.getTags())) .withCapabilities(CAPABILITY_IAM) .withParameters(getStackParameters(ac, stack, cFStackName, subnet)); }  CreateStackRequest createCreateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String subnet, String cfTemplate); CreateStackRequest createCreateStackRequest(AuthenticatedContext ac, DatabaseStack stack, String cFStackName, String cfTemplate); UpdateStackRequest createUpdateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String cfTemplate); DeleteStackRequest createDeleteStackRequest(String cFStackName); }
AwsStackRequestHelper { public CreateStackRequest createCreateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String subnet, String cfTemplate) { return new CreateStackRequest() .withStackName(cFStackName) .withOnFailure(OnFailure.DO_NOTHING) .withTemplateBody(cfTemplate) .withTags(awsTaggingService.prepareCloudformationTags(ac, stack.getTags())) .withCapabilities(CAPABILITY_IAM) .withParameters(getStackParameters(ac, stack, cFStackName, subnet)); }  CreateStackRequest createCreateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String subnet, String cfTemplate); CreateStackRequest createCreateStackRequest(AuthenticatedContext ac, DatabaseStack stack, String cFStackName, String cfTemplate); UpdateStackRequest createUpdateStackRequest(AuthenticatedContext ac, CloudStack stack, String cFStackName, String cfTemplate); DeleteStackRequest createDeleteStackRequest(String cFStackName);  }