@TestConfiguration public class AdminSpringBootTestConfiguration {
@TestConfiguration public static class MissingCatalogAndCatalogServiceConfiguration { public MissingCatalogAndCatalogServiceConfiguration(Catalog catalog, CatalogService catalogService) { } @Bean public ServiceInstanceService serviceInstanceService() { return new TestServiceInstanceService(); } }
@TestConfiguration public class TestConfig { @Bean public Foo foo() { return new Foo("from test config"); } } }
@TestConfiguration public class TestConfig { @Bean public Foo foo() { return new Foo("from test config"); } }
@TestConfiguration public static class TestConfig { @Bean public MultipartConfigElement multipartConfigElement() { return new MultipartConfigElement("myLocation"); } }
@TestConfiguration static class Config { @Bean CamelFriend camelFriend() { return mock(CamelFriend.class); } }
@TestConfiguration static class S3TestConfiguration { @Bean public S3Client s3Client() { return S3Client.create(); } }
@TestConfiguration public static class MissingInstanceServiceConfiguration { public MissingInstanceServiceConfiguration(ServiceInstanceService serviceInstanceService) { } @Bean public Catalog catalog() { return Catalog.builder().build(); } }
@TestConfiguration public static class TestConfig { @Bean public MultipartConfigElement multipartConfigElement() { return new MultipartConfigElement("myLocation"); } } }
@TestConfiguration static class Config { @Bean public RestTemplateBuilder restTemplateBuilder() { return new RestTemplateBuilder() .additionalMessageConverters(new GsonHttpMessageConverter()); } } }
@TestConfiguration static class SSMTestConfiguration { @Bean public SsmClient ssmClient() { SsmClient mock = mock(SsmClient.class); when(mock.getParametersByPath(any(GetParametersByPathRequest.class))).thenReturn( GetParametersByPathResponse.builder() .parameters(Parameter.builder().name("mongo/password").value("secret").build()) .build() ); return mock; } }
@TestConfiguration public static class MockConfiguration { @Bean @Primary public GreetingMessageService greetingMessageService() { return mock(GreetingMessageService.class); } } }
@TestConfiguration public class TestConfig { @Bean public Foo foo() { return new Foo("from test config"); } @Bean public Foo foo2() { return new Foo("from test config2"); } }
@TestConfiguration public static class MinimalWithCatalogConfiguration { @Bean public Catalog catalog() { return Catalog.builder().build(); } @Bean public ServiceInstanceService serviceInstanceService() { return new TestServiceInstanceService(); } }
@TestConfiguration public static class MissingAllConfiguration { public MissingAllConfiguration(Catalog catalog, CatalogService catalogService, ServiceInstanceService serviceInstanceService) { } }
@TestConfiguration public static class TestConfig { @Bean(name = "ipBlockInterceptor") @GrpcGlobalInterceptor public ServerInterceptor ipBlockInterceptor() { return new IpBlockInterceptor(); } } }
@TestConfiguration public static class FullServicesWithCatalogConfiguration { @Bean public Catalog catalog() { return Catalog.builder().build(); } @Bean public ServiceInstanceService serviceInstanceService() { return new TestServiceInstanceService(); } @Bean public ServiceInstanceBindingService serviceInstanceBindingService() { return new TestServiceInstanceBindingService(); } }
@TestConfiguration @Import({OAuth2AutoConfiguration.class}) public class OAuth2ClientTestConfiguration { // The OAuth2 Rest template is configured with the bean }
/** * Created by aleksandr on 18.02.16. */ @TestConfiguration @EnableAspectJAutoProxy public class TestAspectConfiguration { @Bean public CountingAspect countingAspect(){ return new CountingAspect(); } }
@TestConfiguration @EnableConfigurationProperties(TestProperties.class) public static class TestPropertiesAutoConfiguration { } }