@Override public String getTestClassName() { return testContext.getTestClassName(); }
@Override public Class<?> getTestClass() { return testContext.getTestClass(); }
@Override public Object getTestInstance() { return testContext.getTestInstance(); }
public void real(Set<FieldDescriptor> fieldDescriptors) { Class<?> testClass = context.getTestClass(); of(testClass.getDeclaredAnnotationsByType(Module.class)) .map(Module::value) .distinct() .forEachOrdered(locator::addModule); locator.reload(); testReifier.reifyTest(fieldDescriptors); }
@Override protected void runChild(FrameworkMethod method, RunNotifier notifier) { super.runChild(method, notifier); if (method.getAnnotation(Ignore.class) == null) { clientContext.getInstance().close(); serverContext.getInstance().stop(); interceptor.getMethodTestNeeds().destory(); interceptor.getMethodTestNeedContainers().destory(); } }
@Override protected void runChild(FrameworkMethod method, RunNotifier notifier) { super.runChild(method, notifier); if (method.getAnnotation(Ignore.class) == null) { SpringBootDescriptor descriptor = APPLICATION_DESCRIPTORS.get(application); clientInstance.close(); serverInstance.stop(); descriptor.getTestNeeds().destory(); descriptor.getTestContainerNeeds().destory(); } }
@Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { of(beanFactory.getBeanDefinitionNames()) .parallel() .map(beanFactory::getBeanDefinition) .forEach(p -> p.setLazyInit(true)); methodTestNeeds.inject(serviceLocator); methodTestNeedContainers.inject(serviceLocator); if (classTestNeeds != null) { classTestNeeds.inject(serviceLocator); } if (classTestNeedContainers != null) { classTestNeedContainers.inject(serviceLocator); } }
public void real(Set<FieldDescriptor> fieldDescriptors) { Class<?> testClass = context.getTestClass(); of(testClass.getDeclaredAnnotationsByType(Module.class)) .map(Module::value) .distinct() .forEachOrdered(locator::addModule); locator.reload(); testReifier.reifyTest(fieldDescriptors); }
@Override public String getTestClassName() { return testContext.getTestClassName(); }
@Override public Class<?> getTestClass() { return testContext.getTestClass(); }
@Override public Object getTestInstance() { return testContext.getTestInstance(); }
public void real(Set<FieldDescriptor> fieldDescriptors) { Class<?> testClass = context.getTestClass(); of(testClass.getDeclaredAnnotationsByType(Module.class)) .map(Module::value) .distinct() .forEachOrdered(locator::addModule); locator.reload(); testReifier.reifyTest(fieldDescriptors); }
@Override public String getTestClassName() { return testContext.getTestClassName(); }
@Override public Class<?> getTestClass() { return testContext.getTestClass(); }
@Override public Object getTestInstance() { return testContext.getTestInstance(); }
public void real(Set<FieldDescriptor> fieldDescriptors) { Class<?> testClass = context.getTestClass(); of(testClass.getDeclaredAnnotationsByType(Module.class)) .map(Module::value) .distinct() .forEachOrdered(locator::addModule); locator.reload(); testReifier.reifyTest(fieldDescriptors); }
@Override public String getTestClassName() { return testContext.getTestClassName(); }
@Override public Class<?> getTestClass() { return testContext.getTestClass(); }
@Override public Object getTestInstance() { return testContext.getTestInstance(); }