use of org.mule.test.marvel.ironman.IronMan in project mule by mulesoft.
the class NonBlockingOperationsTestCase method nonBlockingOperationReconnection.
@Test
public void nonBlockingOperationReconnection() throws Exception {
fireMissileAndAssert("warMachineFireMissile");
IronMan warMachine = getIronMan("warMachine");
assertThat(warMachine.getMissilesFired(), is(2));
}
use of org.mule.test.marvel.ironman.IronMan in project mule by mulesoft.
the class OperationReconnectionTestCase method defaultReconnection.
@Test
public void defaultReconnection() throws Exception {
final Villain villain = new Villain();
flowRunner("defaultReconnection").withPayload(villain).runExpectingException();
assertThat(villain.isAlive(), is(true));
IronMan stark = getIronMan();
assertThat(stark.getMissilesFired(), is(1));
}
use of org.mule.test.marvel.ironman.IronMan in project mule by mulesoft.
the class OperationReconnectionTestCase method operationReconnection.
@Test
public void operationReconnection() throws Exception {
final Villain villain = new Villain();
flowRunner("operationReconnection").withPayload(villain).run();
assertThat(villain.isAlive(), is(false));
IronMan stark = getIronMan();
assertThat(stark.getMissilesFired(), is(2));
}
use of org.mule.test.marvel.ironman.IronMan in project mule by mulesoft.
the class NonBlockingOperationsTestCase method voidNonBlockingOperation.
@Test
public void voidNonBlockingOperation() throws Exception {
IronMan ironMan = getIronMan("ironMan");
final String payload = "take me to the avengers tower";
Event event = flowRunner("computeFlightPlan").withPayload(payload).run();
assertThat(event.getMessage().getPayload().getValue().toString(), equalTo(payload));
new PollingProber().probe(1000, 1000, () -> FLIGHT_PLAN.equals(ironMan.getFlightPlan()));
}
Aggregations