use of org.mule.test.subtypes.extension.Revolver in project mule by mulesoft.
the class SubTypesMappingParserTestCase method subtypeContributionToOtherExtension.
@Test
public void subtypeContributionToOtherExtension() throws Exception {
HeisenbergExtension heisenberg = lookupHeisenberg("heisenberg");
assertThat(heisenberg, is(notNullValue()));
List<? extends Weapon> wildCardWeapons = heisenberg.getWildCardWeapons();
assertThat(wildCardWeapons, is(notNullValue()));
assertThat(wildCardWeapons, hasSize(2));
assertThat(wildCardWeapons.get(0), instanceOf(Ricin.class));
assertThat(((Ricin) wildCardWeapons.get(0)).getMicrogramsPerKilo(), is(10L));
assertThat(((Ricin) wildCardWeapons.get(0)).getDestination(), is(notNullValue()));
assertThat(((Ricin) wildCardWeapons.get(0)).getDestination().getVictim(), is("Krazy-8"));
assertThat(wildCardWeapons.get(1), instanceOf(Revolver.class));
assertThat(((Revolver) wildCardWeapons.get(1)).getBullets(), is(3));
}
use of org.mule.test.subtypes.extension.Revolver in project mule by mulesoft.
the class SubTypesMappingParserTestCase method parseRevolver.
@Test
public void parseRevolver() throws Exception {
Revolver revolver = registry.<Revolver>lookupByName("sledgeHammer's").get();
assertThat(revolver, is(notNullValue()));
assertThat(revolver.getBullets(), is(1));
}
Aggregations