public void resetAndReconfigure(boolean debug) {
SingularContextSetup.reset();
ApplicationContextMock applicationContext = new ApplicationContextMock();
ServiceRegistryLocator.setup(new SpringServiceRegistry());
new ApplicationContextProvider().setApplicationContext(applicationContext);
registerBeanFactories(applicationContext);
registerAnnotated(applicationContext, Named.class);
registerAnnotated(applicationContext, Service.class);
registerAnnotated(applicationContext, Component.class);
registerAnnotated(applicationContext, Repository.class);
registerMockitoTestClassMocksAndSpies(applicationContext);
getLogger().info("Contexto configurado com os beans: ");
if (debug) {
applicationContext.listAllBeans().forEach(
b -> getLogger().info(b)
);
}
}
SingularServerSpringMockitoTestConfig.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:singular-server
作者:
评论列表
文章目录