Search in sources :

Example 1 with MissileProofVillain

use of org.mule.test.marvel.model.MissileProofVillain in project mule by mulesoft.

the class NonBlockingOperationsTestCase method failingNonBlockingConnectedOperation.

@Test
public void failingNonBlockingConnectedOperation() throws Exception {
    expectedException.expectFailingComponent(is(locator.find(Location.builder().globalName("fireMissile").addProcessorsPart().addIndexPart(1).build()).get()));
    expectedException.expectMessage(is(MISSILE_PROOF));
    expectedException.expectCause(instanceOf(UnsupportedOperationException.class));
    Villain villain = new MissileProofVillain();
    flowRunner("fireMissile").withPayload(villain).run();
    assertThat(villain.isAlive(), is(true));
}
Also used : MissileProofVillain(org.mule.test.marvel.model.MissileProofVillain) MissileProofVillain(org.mule.test.marvel.model.MissileProofVillain) Villain(org.mule.test.marvel.model.Villain) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 MissileProofVillain (org.mule.test.marvel.model.MissileProofVillain)1 Villain (org.mule.test.marvel.model.Villain)1