Search in sources :

Example 1 with TestMpExtraParametersChangedOrder

use of net.dempsy.lifecycle.annotations.TestMps.TestMpExtraParametersChangedOrder in project Dempsy by Dempsy.

the class MessageProcessorTest method testMethodHandleExtraParametersOrderChanged.

@Test
public void testMethodHandleExtraParametersOrderChanged() throws Throwable {
    final MessageProcessor<TestMpExtraParametersChangedOrder> helper = new MessageProcessor<TestMpExtraParametersChangedOrder>(new TestMpExtraParametersChangedOrder());
    helper.validate();
    final TestMpExtraParametersChangedOrder mp = helper.newInstance();
    assertFalse(mp.isActivated());
    helper.activate(mp, "activate");
    assertTrue(mp.isActivated());
    assertFalse(mp.ispassivateCalled());
    helper.passivate(mp);
    assertTrue(mp.ispassivateCalled());
}
Also used : MessageProcessor(net.dempsy.lifecycle.annotation.MessageProcessor) TestMpExtraParametersChangedOrder(net.dempsy.lifecycle.annotations.TestMps.TestMpExtraParametersChangedOrder) Test(org.junit.Test)

Aggregations

MessageProcessor (net.dempsy.lifecycle.annotation.MessageProcessor)1 TestMpExtraParametersChangedOrder (net.dempsy.lifecycle.annotations.TestMps.TestMpExtraParametersChangedOrder)1 Test (org.junit.Test)1