|
|
@ -65,7 +65,7 @@ public class ResetMocksTestExecutionListener extends AbstractTestExecutionListen
|
|
|
|
for (String name : names) {
|
|
|
|
for (String name : names) {
|
|
|
|
BeanDefinition definition = beanFactory.getBeanDefinition(name);
|
|
|
|
BeanDefinition definition = beanFactory.getBeanDefinition(name);
|
|
|
|
if (definition.isSingleton() && instantiatedSingletons.contains(name)) {
|
|
|
|
if (definition.isSingleton() && instantiatedSingletons.contains(name)) {
|
|
|
|
Object bean = beanFactory.getBean(name);
|
|
|
|
Object bean = beanFactory.getSingleton(name);
|
|
|
|
if (reset.equals(MockReset.get(bean))) {
|
|
|
|
if (reset.equals(MockReset.get(bean))) {
|
|
|
|
Mockito.reset(bean);
|
|
|
|
Mockito.reset(bean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|