Package org.milyn.container

Examples of org.milyn.container.MockExecutionContext


  @Test
  public void createJMSMessage() throws ParserConfigurationException, JMSException, SAXException, IOException
  {
    final String beanId = "123";
    final TestBean bean = RouterTestHelper.createBean();
        MockExecutionContext executionContext = RouterTestHelper.createExecutionContext( beanId, bean );

        Message message = strategy.createJMSMessage( beanId, executionContext, jmsSession ) ;

        assertTrue ( message instanceof ObjectMessage );
View Full Code Here


        public String toString() {
          return "someObject";
        }
      });

        MockExecutionContext executionContext = RouterTestHelper.createExecutionContext( beanId, bean );

        Message message = strategy.createJMSMessage( beanId, executionContext, jmsSession ) ;

        assertTrue ( message instanceof MapMessage );
View Full Code Here

*/
public class MVELFactoryTest  extends TestCase {

  public void test_create() throws Exception {

    ExecutionContext context = new MockExecutionContext();

    Factory<Map<?, ?>> factory = new MVELFactory<Map<?, ?>>("new java.util.TreeMap");

    Map<?, ?> map = factory.create(context);

View Full Code Here

  private static final int INVOKE_COUNT = 1000000;

    public void test_parse_basic() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InterruptedException {
      if(DISABLED) return;

      ExecutionContext executionContext = new MockExecutionContext();

        loopParseBasic(10000, executionContext);

        Thread.sleep(1000);
View Full Code Here

    }

    public void test_invoke_static_basic() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InterruptedException {
      if(DISABLED) return;

      ExecutionContext executionContext = new MockExecutionContext();

      BasicFactoryDefinitionParser parser = new BasicFactoryDefinitionParser();
        Factory<?> factory = parser.parse("org.milyn.javabean.TestFactory#newArrayList");

        loopInvoke(10000, factory, executionContext);
View Full Code Here

    }

    public void test_invoke_instance_basic() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InterruptedException {
      if(DISABLED) return;

      ExecutionContext executionContext = new MockExecutionContext();

      BasicFactoryDefinitionParser parser = new BasicFactoryDefinitionParser();
        Factory<?> factory = parser.parse("org.milyn.javabean.TestFactory#newInstance.newLinkedList");

        loopInvoke(10000, factory, executionContext);
View Full Code Here


  public void test_parse_MVEL() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InterruptedException {
    if(DISABLED) return;

    ExecutionContext executionContext = new MockExecutionContext();

        loopParseMVEL(10000, executionContext);

        Thread.sleep(1000);
View Full Code Here

    }

  public void test_invoke_static_MVEL() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InterruptedException {
    if(DISABLED) return;

    ExecutionContext executionContext = new MockExecutionContext();

      MVELFactoryDefinitionParser parser = new MVELFactoryDefinitionParser();
        Factory<?> factory = parser.parse("org.milyn.javabean.TestFactory.newArrayList()");

        loopInvoke(10000, factory, executionContext);
View Full Code Here

    }

  public void test_invoke_instance_MVEL() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InterruptedException {
    if(DISABLED) return;

    ExecutionContext executionContext = new MockExecutionContext();

      MVELFactoryDefinitionParser parser = new MVELFactoryDefinitionParser();
        Factory<?> factory = parser.parse("org.milyn.javabean.TestFactory.newInstance().newLinkedList()");

        loopInvoke(10000, factory, executionContext);
View Full Code Here

    BasicFactoryDefinitionParser parser = new BasicFactoryDefinitionParser();

    Factory<?> factory = parser.parse("org.milyn.javabean.TestFactory#newArrayList");

    Object result = factory.create(new MockExecutionContext());

    assertNotNull(result);
    assertTrue(result instanceof ArrayList<?>);

  }
View Full Code Here

TOP

Related Classes of org.milyn.container.MockExecutionContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.