Search in sources :

Example 6 with Calculator

use of org.springframework.scripting.Calculator in project spring-framework by spring-projects.

the class BshScriptFactoryTests method inlineScriptFromTag.

@Test
public void inlineScriptFromTag() throws Exception {
    ApplicationContext ctx = new ClassPathXmlApplicationContext("bsh-with-xsd.xml", getClass());
    Calculator calculator = (Calculator) ctx.getBean("calculator");
    assertNotNull(calculator);
    assertFalse(calculator instanceof Refreshable);
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) Calculator(org.springframework.scripting.Calculator) Refreshable(org.springframework.aop.target.dynamic.Refreshable) Test(org.junit.Test)

Aggregations

ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)6 Calculator (org.springframework.scripting.Calculator)6 Test (org.junit.Test)5 Refreshable (org.springframework.aop.target.dynamic.Refreshable)5 ApplicationContext (org.springframework.context.ApplicationContext)5 ConfigurableMessenger (org.springframework.scripting.ConfigurableMessenger)3 Messenger (org.springframework.scripting.Messenger)3 BeanDefinition (org.springframework.beans.factory.config.BeanDefinition)1 TestBeanAwareMessenger (org.springframework.scripting.TestBeanAwareMessenger)1