Use consistent javadoc style for annotation links
Closes gh-13920
This commit is contained in:
@@ -138,7 +138,8 @@ class ImportsContextCustomizer implements ContextCustomizer {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link Configuration} registered to trigger the {@link ImportsSelector}.
|
||||
* {@link Configuration @Configuration} registered to trigger the
|
||||
* {@link ImportsSelector}.
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import(ImportsSelector.class)
|
||||
|
||||
@@ -60,7 +60,8 @@ import org.springframework.web.context.support.GenericWebApplicationContext;
|
||||
/**
|
||||
* A {@link ContextLoader} that can be used to test Spring Boot applications (those that
|
||||
* normally startup using {@link SpringApplication}). Although this loader can be used
|
||||
* directly, most test will instead want to use it with {@link SpringBootTest}.
|
||||
* directly, most test will instead want to use it with
|
||||
* {@link SpringBootTest @SpringBootTest}.
|
||||
* <p>
|
||||
* The loader supports both standard {@link MergedContextConfiguration} as well as
|
||||
* {@link WebMergedContextConfiguration}. If {@link WebMergedContextConfiguration} is used
|
||||
|
||||
@@ -111,7 +111,7 @@ public @interface SpringBootTest {
|
||||
* {@link ContextConfiguration#classes() @ContextConfiguration(classes=...)}. If no
|
||||
* explicit classes are defined the test will look for nested
|
||||
* {@link Configuration @Configuration} classes, before falling back to a
|
||||
* {@link SpringBootConfiguration} search.
|
||||
* {@link SpringBootConfiguration @SpringBootConfiguration} search.
|
||||
* @see ContextConfiguration#classes()
|
||||
* @return the annotated classes used to load the application context
|
||||
*/
|
||||
@@ -141,7 +141,7 @@ public @interface SpringBootTest {
|
||||
* Creates a web application context (reactive or servlet based) and sets a
|
||||
* {@code server.port=0} {@link Environment} property (which usually triggers
|
||||
* listening on a random port). Often used in conjunction with a
|
||||
* {@link LocalServerPort} injected field on the test.
|
||||
* {@link LocalServerPort @LocalServerPort} injected field on the test.
|
||||
*/
|
||||
RANDOM_PORT(true),
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ import org.springframework.core.type.classreading.MetadataReader;
|
||||
import org.springframework.core.type.classreading.MetadataReaderFactory;
|
||||
|
||||
/**
|
||||
* {@link TypeExcludeFilter} to exclude classes annotated with {@link TestComponent} as
|
||||
* well as inner-classes of tests.
|
||||
* {@link TypeExcludeFilter} to exclude classes annotated with
|
||||
* {@link TestComponent @TestComponent} as well as inner-classes of tests.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,12 +23,13 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Container annotation that aggregates several {@link MockBean} annotations.
|
||||
* Container annotation that aggregates several {@link MockBean @MockBean} annotations.
|
||||
* <p>
|
||||
* Can be used natively, declaring several nested {@link MockBean} annotations. Can also
|
||||
* be used in conjunction with Java 8's support for <em>repeatable annotations</em>, where
|
||||
* {@link MockBean} can simply be declared several times on the same
|
||||
* {@linkplain ElementType#TYPE type}, implicitly generating this container annotation.
|
||||
* Can be used natively, declaring several nested {@link MockBean @MockBean} annotations.
|
||||
* Can also be used in conjunction with Java 8's support for <em>repeatable
|
||||
* annotations</em>, where {@link MockBean @MockBean} can simply be declared several times
|
||||
* on the same {@linkplain ElementType#TYPE type}, implicitly generating this container
|
||||
* annotation.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.4.0
|
||||
@@ -39,7 +40,7 @@ import java.lang.annotation.Target;
|
||||
public @interface MockBeans {
|
||||
|
||||
/**
|
||||
* Return the contained {@link MockBean} annotations.
|
||||
* Return the contained {@link MockBean @MockBean} annotations.
|
||||
* @return the mock beans
|
||||
*/
|
||||
MockBean[] value();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -455,8 +455,9 @@ public class MockitoPostProcessor extends InstantiationAwareBeanPostProcessorAda
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link BeanPostProcessor} to handle {@link SpyBean} definitions. Registered as a
|
||||
* separate processor so that it can be ordered above AOP post processors.
|
||||
* {@link BeanPostProcessor} to handle {@link SpyBean @SpyBean} definitions.
|
||||
* Registered as a separate processor so that it can be ordered above AOP post
|
||||
* processors.
|
||||
*/
|
||||
static class SpyPostProcessor extends InstantiationAwareBeanPostProcessorAdapter
|
||||
implements PriorityOrdered {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,8 +34,8 @@ import org.springframework.util.ReflectionUtils.FieldCallback;
|
||||
|
||||
/**
|
||||
* {@link TestExecutionListener} to trigger {@link MockitoAnnotations#initMocks(Object)}
|
||||
* when {@link MockBean @MockBean} annotations are used. Primarily to allow {@link Captor}
|
||||
* annotations.
|
||||
* when {@link MockBean @MockBean} annotations are used. Primarily to allow
|
||||
* {@link Captor @Captor} annotations.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,12 +23,13 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Container annotation that aggregates several {@link SpyBean} annotations.
|
||||
* Container annotation that aggregates several {@link SpyBean @SpyBean} annotations.
|
||||
* <p>
|
||||
* Can be used natively, declaring several nested {@link SpyBean} annotations. Can also be
|
||||
* used in conjunction with Java 8's support for <em>repeatable annotations</em>, where
|
||||
* {@link SpyBean} can simply be declared several times on the same
|
||||
* {@linkplain ElementType#TYPE type}, implicitly generating this container annotation.
|
||||
* Can be used natively, declaring several nested {@link SpyBean @SpyBean} annotations.
|
||||
* Can also be used in conjunction with Java 8's support for <em>repeatable
|
||||
* annotations</em>, where {@link SpyBean @SpyBean} can simply be declared several times
|
||||
* on the same {@linkplain ElementType#TYPE type}, implicitly generating this container
|
||||
* annotation.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.4.0
|
||||
@@ -39,7 +40,7 @@ import java.lang.annotation.Target;
|
||||
public @interface SpyBeans {
|
||||
|
||||
/**
|
||||
* Return the contained {@link SpyBean} annotations.
|
||||
* Return the contained {@link SpyBean @SpyBean} annotations.
|
||||
* @return the spy beans
|
||||
*/
|
||||
SpyBean[] value();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,8 +37,8 @@ import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Base class for {@link SpringBootTest} tests configured to start an embedded reactive
|
||||
* container.
|
||||
* Base class for {@link SpringBootTest @SpringBootTest} tests configured to start an
|
||||
* embedded reactive container.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,7 +37,8 @@ import org.springframework.web.servlet.DispatcherServlet;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Base class for {@link SpringBootTest} tests configured to start an embedded web server.
|
||||
* Base class for {@link SpringBootTest @SpringBootTest} tests configured to start an
|
||||
* embedded web server.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -42,7 +42,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
/**
|
||||
* Tests for {@link WebAppConfiguration} integration.
|
||||
* Tests for {@link WebAppConfiguration @WebAppConfiguration} integration.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} with active profiles. See gh-1469.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} with active profiles. See gh-1469.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} with application arguments.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} with application arguments.
|
||||
*
|
||||
* @author Justin Griffin
|
||||
* @author Stephane Nicoll
|
||||
|
||||
@@ -26,7 +26,8 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.ContextHierarchy;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} and {@link ContextHierarchy}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} and
|
||||
* {@link ContextHierarchy @ContextHierarchy}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} with a custom config name
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} with a custom config name
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
|
||||
@@ -27,8 +27,8 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Test for {@link SpringBootTest} with a custom inline server.port in a non-embedded web
|
||||
* environment.
|
||||
* Test for {@link SpringBootTest @SpringBootTest} with a custom inline server.port in a
|
||||
* non-embedded web environment.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} (detectDefaultConfigurationClasses).
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} (detectDefaultConfigurationClasses).
|
||||
*
|
||||
* @author Dave Syer
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} (detectDefaultConfigurationClasses).
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} (detectDefaultConfigurationClasses).
|
||||
*
|
||||
* @author Dave Syer
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} finding groovy config.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} finding groovy config.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest}.
|
||||
*
|
||||
* @author Dave Syer
|
||||
*/
|
||||
|
||||
@@ -26,8 +26,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.reactive.config.EnableWebFlux;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} in a reactive environment configured with
|
||||
* {@link WebEnvironment#DEFINED_PORT}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} in a reactive environment configured
|
||||
* with {@link WebEnvironment#DEFINED_PORT}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
|
||||
@@ -26,8 +26,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.reactive.config.EnableWebFlux;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} in a reactive environment configured with
|
||||
* {@link WebEnvironment#RANDOM_PORT}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} in a reactive environment configured
|
||||
* with {@link WebEnvironment#RANDOM_PORT}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
|
||||
@@ -31,8 +31,8 @@ import org.springframework.web.reactive.config.EnableWebFlux;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} in a reactive environment configured with a
|
||||
* user-defined {@link RestTemplate} that is named {@code testRestTemplate}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} in a reactive environment configured
|
||||
* with a user-defined {@link RestTemplate} that is named {@code testRestTemplate}.
|
||||
*
|
||||
* @author Madhura Bhave
|
||||
*/
|
||||
|
||||
@@ -31,8 +31,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} configured with a user-defined {@link RestTemplate}
|
||||
* that is named {@code testRestTemplate}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} configured with a user-defined
|
||||
* {@link RestTemplate} that is named {@code testRestTemplate}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -37,7 +37,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} configured with {@link WebEnvironment#DEFINED_PORT}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} configured with
|
||||
* {@link WebEnvironment#DEFINED_PORT}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -26,7 +26,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} configured with {@link WebEnvironment#DEFINED_PORT}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} configured with
|
||||
* {@link WebEnvironment#DEFINED_PORT}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -38,7 +38,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} configured with {@link WebEnvironment#MOCK}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} configured with
|
||||
* {@link WebEnvironment#MOCK}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -34,7 +34,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} configured with {@link WebEnvironment#MOCK}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} configured with
|
||||
* {@link WebEnvironment#MOCK}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -31,8 +31,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Test for {@link SpringBootTest} with a custom inline server.port in an embedded web
|
||||
* environment.
|
||||
* Test for {@link SpringBootTest @SpringBootTest} with a custom inline server.port in an
|
||||
* embedded web environment.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} configured with {@link WebEnvironment#RANDOM_PORT}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} configured with
|
||||
* {@link WebEnvironment#RANDOM_PORT}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} configured with specific classes.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} configured with specific classes.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} configured with {@link ContextConfiguration}.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} configured with
|
||||
* {@link ContextConfiguration @ContextConfiguration}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,8 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for using {@link SpringBootTest} with {@link TestPropertySource}.
|
||||
* Tests for using {@link SpringBootTest @SpringBootTest} with
|
||||
* {@link TestPropertySource @TestPropertySource}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SpringBootTest} finding XML config.
|
||||
* Tests for {@link SpringBootTest @SpringBootTest} finding XML config.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,7 @@ import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} for a factory bean.
|
||||
* Test {@link MockBean @MockBean} for a factory bean.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a configuration class can be used to replace existing beans.
|
||||
* Test {@link MockBean @MockBean} on a configuration class can be used to replace
|
||||
* existing beans.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a configuration class can be used to inject new mock
|
||||
* Test {@link MockBean @MockBean} on a configuration class can be used to inject new mock
|
||||
* instances.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
|
||||
@@ -31,8 +31,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a field on a {@code @Configuration} class can be used to
|
||||
* replace existing beans.
|
||||
* Test {@link MockBean @MockBean} on a field on a {@code @Configuration} class can be
|
||||
* used to replace existing beans.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -30,8 +30,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a field on a {@code @Configuration} class can be used to
|
||||
* inject new mock instances.
|
||||
* Test {@link MockBean @MockBean} on a field on a {@code @Configuration} class can be
|
||||
* used to inject new mock instances.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,8 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} can be used with a {@link ContextHierarchy}.
|
||||
* Test {@link MockBean @MockBean} can be used with a
|
||||
* {@link ContextHierarchy @ContextHierarchy}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} when used in combination with scoped proxy targets.
|
||||
* Test {@link MockBean @MockBean} when used in combination with scoped proxy targets.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5724">gh-5724</a>
|
||||
|
||||
@@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a test class can be used to replace existing beans.
|
||||
* Test {@link MockBean @MockBean} on a test class can be used to replace existing beans.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a test class can be used to inject new mock instances.
|
||||
* Test {@link MockBean @MockBean} on a test class can be used to inject new mock
|
||||
* instances.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,8 +29,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a test class field can be used to replace existing beans when
|
||||
* the context is cached. This test is identical to
|
||||
* Test {@link MockBean @MockBean} on a test class field can be used to replace existing
|
||||
* beans when the context is cached. This test is identical to
|
||||
* {@link MockBeanOnTestFieldForExistingBeanIntegrationTests} so one of them should
|
||||
* trigger application context caching.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a test class field can be used to replace existing beans.
|
||||
* Test {@link MockBean @MockBean} on a test class field can be used to replace existing
|
||||
* beans.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @see MockBeanOnTestFieldForExistingBeanCacheIntegrationTests
|
||||
|
||||
@@ -34,8 +34,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a test class field can be used to replace existing bean while
|
||||
* preserving qualifiers.
|
||||
* Test {@link MockBean @MockBean} on a test class field can be used to replace existing
|
||||
* bean while preserving qualifiers.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Phillip Webb
|
||||
|
||||
@@ -30,7 +30,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a test class field can be used to inject new mock instances.
|
||||
* Test {@link MockBean @MockBean} on a test class field can be used to inject new mock
|
||||
* instances.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,7 @@ import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} when mixed with Spring AOP.
|
||||
* Test {@link MockBean @MockBean} when mixed with Spring AOP.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5837">5837</a>
|
||||
|
||||
@@ -32,8 +32,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Integration tests for using {@link MockBean} with {@link DirtiesContext} and
|
||||
* {@link ClassMode#BEFORE_EACH_TEST_METHOD}.
|
||||
* Integration tests for using {@link MockBean @MockBean} with
|
||||
* {@link DirtiesContext @DirtiesContext} and {@link ClassMode#BEFORE_EACH_TEST_METHOD}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* Test {@link MockBean} on a test class field can be used to inject new mock instances.
|
||||
* Test {@link MockBean @MockBean} on a test class field can be used to inject new mock
|
||||
* instances.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a configuration class can be used to spy existing beans.
|
||||
* Test {@link SpyBean @SpyBean} on a configuration class can be used to spy existing
|
||||
* beans.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a configuration class can be used to inject new spy instances.
|
||||
* Test {@link SpyBean @SpyBean} on a configuration class can be used to inject new spy
|
||||
* instances.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -31,8 +31,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a field on a {@code @Configuration} class can be used to
|
||||
* replace existing beans.
|
||||
* Test {@link SpyBean @SpyBean} on a field on a {@code @Configuration} class can be used
|
||||
* to replace existing beans.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -30,8 +30,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a field on a {@code @Configuration} class can be used to inject
|
||||
* new spy instances.
|
||||
* Test {@link SpyBean @SpyBean} on a field on a {@code @Configuration} class can be used
|
||||
* to inject new spy instances.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,8 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} can be used with a {@link ContextHierarchy}.
|
||||
* Test {@link SpyBean @SpyBean} can be used with a
|
||||
* {@link ContextHierarchy @ContextHierarchy}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a test class can be used to replace existing beans.
|
||||
* Test {@link SpyBean @SpyBean} on a test class can be used to replace existing beans.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a test class can be used to inject new spy instances.
|
||||
* Test {@link SpyBean @SpyBean} on a test class can be used to inject new spy instances.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,8 +29,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a test class field can be used to replace existing beans when
|
||||
* the context is cached. This test is identical to
|
||||
* Test {@link SpyBean @SpyBean} on a test class field can be used to replace existing
|
||||
* beans when the context is cached. This test is identical to
|
||||
* {@link SpyBeanOnTestFieldForExistingBeanIntegrationTests} so one of them should trigger
|
||||
* application context caching.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a test class field can be used to replace existing beans.
|
||||
* Test {@link SpyBean @SpyBean} on a test class field can be used to replace existing
|
||||
* beans.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @see SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests
|
||||
|
||||
@@ -34,8 +34,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a test class field can be used to replace existing bean while
|
||||
* preserving qualifiers.
|
||||
* Test {@link SpyBean @SpyBean} on a test class field can be used to replace existing
|
||||
* bean while preserving qualifiers.
|
||||
*
|
||||
* @author Andreas Neiser
|
||||
*/
|
||||
|
||||
@@ -33,7 +33,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a test class field can be used to replace existing beans.
|
||||
* Test {@link SpyBean @SpyBean} on a test class field can be used to replace existing
|
||||
* beans.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @see SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests
|
||||
|
||||
@@ -33,8 +33,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a test class field can be used to inject a spy instance when
|
||||
* there are multiple candidates and one is primary.
|
||||
* Test {@link SpyBean @SpyBean} on a test class field can be used to inject a spy
|
||||
* instance when there are multiple candidates and one is primary.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a test class field can be used to inject new spy instances.
|
||||
* Test {@link SpyBean @SpyBean} on a test class field can be used to inject new spy
|
||||
* instances.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
|
||||
@@ -40,7 +40,7 @@ import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} when mixed with Spring AOP.
|
||||
* Test {@link SpyBean @SpyBean} when mixed with Spring AOP.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5837">5837</a>
|
||||
|
||||
@@ -40,7 +40,7 @@ import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} when mixed with Spring AOP.
|
||||
* Test {@link SpyBean @SpyBean} when mixed with Spring AOP.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5837">5837</a>
|
||||
|
||||
@@ -31,8 +31,8 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Integration tests for using {@link SpyBean} with {@link DirtiesContext} and
|
||||
* {@link ClassMode#BEFORE_EACH_TEST_METHOD}.
|
||||
* Integration tests for using {@link SpyBean @SpyBean} with
|
||||
* {@link DirtiesContext @DirtiesContext} and {@link ClassMode#BEFORE_EACH_TEST_METHOD}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
|
||||
@@ -29,8 +29,8 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Test {@link SpyBean} on a test class field can be used to inject a spy instance when
|
||||
* there are multiple candidates and one is chosen using the name attribute.
|
||||
* Test {@link SpyBean @SpyBean} on a test class field can be used to inject a spy
|
||||
* instance when there are multiple candidates and one is chosen using the name attribute.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
||||
Reference in New Issue
Block a user