Package org.asmatron.messengine.action

Examples of org.asmatron.messengine.action.ActionHandler


    controlConfigurator.setupControlEngine(annotationTester);

    verify(engine).addActionHandler(actionTypeCaptor.capture(),
        actionHandlerCaptor.capture());
    ActionId type = actionTypeCaptor.getValue();
    ActionHandler handler = actionHandlerCaptor.getValue();
    assertEquals(TestTypes.requestId, type.getId());
    assertEquals(TestTypes.request, type);

    assertNotNull(handler);
    assertFalse(annotationTester.requestHandled);
    handler.handle(new RequestAction<String, Integer>("5", EmptyCallback
        .get(Integer.class)));
    assertTrue(annotationTester.requestHandled);
  }
View Full Code Here


    controlConfigurator.setupControlEngine(annotationTester);

    verify(engine).addActionHandler(actionTypeCaptor.capture(),
        actionHandlerCaptor.capture());
    ActionId type = actionTypeCaptor.getValue();
    ActionHandler handler = actionHandlerCaptor.getValue();

    assertEquals(TestTypes.actionId, type.getId());
    assertEquals(TestTypes.action, type);

    assertNotNull(handler);
    assertNull(annotationTester.val);
    handler.handle(new ValueAction("a"));
    assertEquals("a", annotationTester.val);

  }
View Full Code Here

TOP

Related Classes of org.asmatron.messengine.action.ActionHandler

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.