Search in sources :

Example 46 with DirectFieldAccessor

use of cn.taketoday.beans.DirectFieldAccessor in project today-framework by TAKETODAY.

the class DefaultLifecycleProcessorTests method defaultLifecycleProcessorInstance.

@Test
public void defaultLifecycleProcessorInstance() {
    StaticApplicationContext context = new StaticApplicationContext();
    context.refresh();
    Object lifecycleProcessor = new DirectFieldAccessor(context).getPropertyValue("lifecycleProcessor");
    assertThat(lifecycleProcessor).isNotNull();
    assertThat(lifecycleProcessor.getClass()).isEqualTo(DefaultLifecycleProcessor.class);
}
Also used : StaticApplicationContext(cn.taketoday.context.support.StaticApplicationContext) DirectFieldAccessor(cn.taketoday.beans.DirectFieldAccessor) Test(org.junit.jupiter.api.Test)

Aggregations

DirectFieldAccessor (cn.taketoday.beans.DirectFieldAccessor)46 Test (org.junit.jupiter.api.Test)34 ScriptEngine (javax.script.ScriptEngine)6 Test (org.junit.Test)6 AnnotationConfigApplicationContext (cn.taketoday.context.annotation.AnnotationConfigApplicationContext)4 ThreadPoolTaskScheduler (cn.taketoday.scheduling.concurrent.ThreadPoolTaskScheduler)4 TemplateEngine (groovy.text.TemplateEngine)4 MarkupTemplateEngine (groovy.text.markup.MarkupTemplateEngine)4 Method (java.lang.reflect.Method)4 Map (java.util.Map)4 MethodInterceptor (org.aopalliance.intercept.MethodInterceptor)4 BeanDefinition (cn.taketoday.beans.factory.config.BeanDefinition)3 RootBeanDefinition (cn.taketoday.beans.factory.support.RootBeanDefinition)3 Advisor (cn.taketoday.aop.Advisor)2 Advised (cn.taketoday.aop.framework.Advised)2 LifecycleProcessor (cn.taketoday.context.LifecycleProcessor)2 StaticApplicationContext (cn.taketoday.context.support.StaticApplicationContext)2 MediaType (cn.taketoday.http.MediaType)2 ExponentialBackOffPolicy (cn.taketoday.retry.backoff.ExponentialBackOffPolicy)2 SimpleRetryPolicy (cn.taketoday.retry.policy.SimpleRetryPolicy)2