use of org.mule.runtime.internal.dsl.DefaultDslResolvingContext in project mule by mulesoft.
the class ExtensionActivatorTestCase method enumsReleasedWhenStopped.
@Test
public void enumsReleasedWhenStopped() throws Exception {
Map<String, Object> attributes = new HashMap<>();
attributes.put(TYPE_PROPERTY_NAME, HeisenbergExtension.class.getName());
attributes.put(VERSION, "1.0.0");
ExtensionModel extensionModel = new DefaultJavaExtensionModelLoader().loadExtensionModel(HeisenbergExtension.class.getClassLoader(), new DefaultDslResolvingContext(Collections.emptySet()), attributes);
ExtensionActivator extensionActivator = new ExtensionActivator(mock(ExtensionErrorsRegistrant.class, RETURNS_DEEP_STUBS), mockMuleContext());
extensionActivator.activateExtension(extensionModel);
assertThat(extensionActivator.getEnumTypes().size(), is(greaterThan(0)));
extensionActivator.stop();
assertThat(extensionActivator.getEnumTypes(), hasSize(0));
}
Aggregations