@Test void createInstance_stackWithTwoResources_listsBothResources() throws Exception { Map<String, String> resourceIdMappings = new HashMap<>(); resourceIdMappings.put("logicalResourceIdOne", "physicalResourceIdOne"); resourceIdMappings.put("logicalResourceIdTwo", "physicalResourceIdTwo"); StackResourceRegistryFactoryBean stackResourceRegistryFactoryBean = makeStackResourceRegistryFactoryBean( STACK_NAME, resourceIdMappings); ListableStackResourceFactory stackResourceRegistry = stackResourceRegistryFactoryBean .createInstance(); assertThat(stackResourceRegistry.getAllResources().size()).isEqualTo(2); for (StackResource stackResource : stackResourceRegistry.getAllResources()) { assertThat(stackResource.getLogicalId()).isIn("logicalResourceIdOne", "logicalResourceIdTwo"); assertThat(stackResource.getPhysicalId()).isIn("physicalResourceIdOne", "physicalResourceIdTwo"); assertThat(stackResource.getType()).isEqualTo("Amazon::SES::Test"); } }
@Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); }
StackResourceRegistryFactoryBean extends AbstractFactoryBean<ListableStackResourceFactory> { @Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); } }
StackResourceRegistryFactoryBean extends AbstractFactoryBean<ListableStackResourceFactory> { @Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); } StackResourceRegistryFactoryBean(
			AmazonCloudFormation amazonCloudFormationClient,
			StackNameProvider stackNameProvider); }
StackResourceRegistryFactoryBean extends AbstractFactoryBean<ListableStackResourceFactory> { @Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); } StackResourceRegistryFactoryBean(
			AmazonCloudFormation amazonCloudFormationClient,
			StackNameProvider stackNameProvider); @Override Class<?> getObjectType(); }
StackResourceRegistryFactoryBean extends AbstractFactoryBean<ListableStackResourceFactory> { @Override protected ListableStackResourceFactory createInstance() { String stackName = this.stackNameProvider.getStackName(); return new StaticStackResourceRegistry(stackName, getResourceMappings("", stackName)); } StackResourceRegistryFactoryBean(
			AmazonCloudFormation amazonCloudFormationClient,
			StackNameProvider stackNameProvider); @Override Class<?> getObjectType();  }