use of org.mule.test.heisenberg.extension.HeisenbergExtension in project mule by mulesoft.
the class ParameterizedConfigParserTestCase method configWithExpressionFunctionIsSameInstanceForDifferentEvents.
@Test
public void configWithExpressionFunctionIsSameInstanceForDifferentEvents() throws Exception {
CoreEvent event = null;
try {
event = getHeisenbergEvent();
CoreEvent anotherEvent = testEvent();
HeisenbergExtension config = lookupHeisenberg(HEISENBERG_BYNAME, event);
HeisenbergExtension anotherConfig = lookupHeisenberg(HEISENBERG_BYNAME, anotherEvent);
assertThat(config, is(sameInstance(anotherConfig)));
} finally {
if (event != null) {
((BaseEventContext) event.getContext()).success();
}
}
}
use of org.mule.test.heisenberg.extension.HeisenbergExtension in project mule by mulesoft.
the class ParameterizedConfigParserTestCase method injectedConfigName.
@Test
public void injectedConfigName() throws Exception {
HeisenbergExtension heisenberg = lookupHeisenberg(testConfig);
assertThat(heisenberg.getConfigName(), equalTo(testConfig));
}
use of org.mule.test.heisenberg.extension.HeisenbergExtension in project mule by mulesoft.
the class ParameterizedConfigParserTestCase method sameInstanceForEquivalentEvent.
@Test
public void sameInstanceForEquivalentEvent() throws Exception {
CoreEvent event = null;
try {
event = getHeisenbergEvent();
HeisenbergExtension heisenberg = lookupHeisenberg(testConfig, event);
assertThat(heisenberg, is(sameInstance(lookupHeisenberg(testConfig, event))));
} finally {
if (event != null) {
((BaseEventContext) event.getContext()).success();
}
}
}
use of org.mule.test.heisenberg.extension.HeisenbergExtension in project mule by mulesoft.
the class ParameterizedConfigParserTestCase method dependenciesInjected.
@Test
public void dependenciesInjected() throws Exception {
HeisenbergExtension heisenberg = lookupHeisenberg(testConfig);
assertThat(heisenberg.getExtensionManager(), is(sameInstance(muleContext.getExtensionManager())));
}
use of org.mule.test.heisenberg.extension.HeisenbergExtension in project mule by mulesoft.
the class SingleConfigParserTestCase method getHealthProgression.
@Test
public void getHealthProgression() throws Exception {
CoreEvent event = null;
try {
event = getHeisenbergEvent();
HeisenbergExtension config = lookupHeisenberg(HEISENBERG_BYNAME, event);
assertThat(config.getHealthProgression(), is(not(nullValue())));
assertThat(config.getHealthProgression().size(), is(3));
assertThat(config.getHealthProgression(), contains(HEALTHY, CANCER, DEAD));
} finally {
if (event != null) {
((BaseEventContext) event.getContext()).success();
}
}
}
Aggregations