Polish
Closes gh-10921
This commit is contained in:
committed by
Stephane Nicoll
parent
c9e18e2130
commit
c05a299520
@@ -41,7 +41,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
* existing bean is defined a new one will be added. Dependencies that are known to the
|
||||
* application context but are not beans (such as those
|
||||
* {@link org.springframework.beans.factory.config.ConfigurableListableBeanFactory#registerResolvableDependency(Class, Object)
|
||||
* registered directly} ) will not be found and a mocked bean will be added to the context
|
||||
* registered directly}) will not be found and a mocked bean will be added to the context
|
||||
* alongside the existing dependency.
|
||||
* <p>
|
||||
* When {@code @MockBean} is used on a field, as well as being registered in the
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
* will be added. Dependencies that are known to the application context but are not beans
|
||||
* (such as those
|
||||
* {@link org.springframework.beans.factory.config.ConfigurableListableBeanFactory#registerResolvableDependency(Class, Object)
|
||||
* registered directly} ) will not be found and a spied bean will be added to the context
|
||||
* registered directly}) will not be found and a spied bean will be added to the context
|
||||
* alongside the existing dependency.
|
||||
* <p>
|
||||
* When {@code @SpyBean} is used on a field, as well as being registered in the
|
||||
|
||||
@@ -44,7 +44,7 @@ public class SpyBeanWithNameOnTestFieldForMultipleExistingBeansTests {
|
||||
@Test
|
||||
public void testSpying() throws Exception {
|
||||
MockingDetails mockingDetails = Mockito.mockingDetails(this.spy);
|
||||
assertThat(mockingDetails.isMock()).isTrue();
|
||||
assertThat(mockingDetails.isSpy()).isTrue();
|
||||
assertThat(mockingDetails.getMockCreationSettings().getMockName().toString())
|
||||
.isEqualTo("two");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user