use of org.mule.runtime.core.internal.registry.DefaultRegistry in project mule by mulesoft.
the class DefaultMuleApplicationStatusTestCase method doSetUp.
@Override
protected void doSetUp() throws Exception {
MuleApplicationClassLoader parentArtifactClassLoader = mock(MuleApplicationClassLoader.class);
mockArtifactContext = mock(ArtifactContext.class);
when(mockArtifactContext.getMuleContext()).thenReturn(muleContext);
when(mockArtifactContext.getRegistry()).thenReturn(new DefaultRegistry(muleContext));
application = new DefaultMuleApplication(null, parentArtifactClassLoader, emptyList(), null, mock(ServiceRepository.class), mock(ExtensionModelLoaderRepository.class), appLocation, null, null);
application.setArtifactContext(mockArtifactContext);
muleContext.getInjector().inject(this);
}
use of org.mule.runtime.core.internal.registry.DefaultRegistry in project mule by mulesoft.
the class AbstractDeploymentTestCase method assertConditionOnRegistry.
protected void assertConditionOnRegistry(TestDeploymentListener listener, Function<DefaultRegistry, Boolean> verifier) {
Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
prober.check(new JUnitProbe() {
@Override
public boolean test() {
DefaultRegistry registry = (DefaultRegistry) listener.getRegistry();
if (registry == null) {
return false;
}
return verifier.apply(registry);
}
@Override
public String describeFailure() {
return "Properties were not overriden by the deployment properties";
}
});
}
Aggregations