Search in sources :

Example 6 with PluginUrlClassification

use of org.mule.test.runner.api.PluginUrlClassification in project mule by mulesoft.

the class PluginLookPolicyFactoryTestCase method lookupPoliciesForPluginThatDoesNotDeclareDependency.

@Test
public void lookupPoliciesForPluginThatDoesNotDeclareDependency() {
    PluginUrlClassification barPluginClassification = new PluginUrlClassification(BAR_PLUGIN_ID, emptyList(), emptyList(), emptyList());
    List<PluginUrlClassification> pluginClassifications = newArrayList(barPluginClassification, fooPluginClassification);
    ClassLoaderLookupPolicy parentLookupPolicies = getParentClassLoaderLookupPolicy();
    ClassLoaderLookupPolicy pluginPolicy = factory.createLookupPolicy(barPluginClassification, pluginClassifications, parentLookupPolicies, null);
    assertThat(pluginPolicy.getClassLookupStrategy(FOO_PACKAGE), is(nullValue()));
}
Also used : ClassLoaderLookupPolicy(org.mule.runtime.module.artifact.api.classloader.ClassLoaderLookupPolicy) PluginUrlClassification(org.mule.test.runner.api.PluginUrlClassification) Test(org.junit.Test) SmallTest(org.mule.tck.size.SmallTest)

Aggregations

PluginUrlClassification (org.mule.test.runner.api.PluginUrlClassification)6 ClassLoaderLookupPolicy (org.mule.runtime.module.artifact.api.classloader.ClassLoaderLookupPolicy)5 HashMap (java.util.HashMap)3 ArtifactClassLoader (org.mule.runtime.module.artifact.api.classloader.ArtifactClassLoader)3 LookupStrategy (org.mule.runtime.module.artifact.api.classloader.LookupStrategy)3 Lists.newArrayList (com.google.common.collect.Lists.newArrayList)2 URL (java.net.URL)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Map (java.util.Map)2 Test (org.junit.Test)2 ContainerClassLoaderFactory (org.mule.runtime.container.internal.ContainerClassLoaderFactory)2 ContainerOnlyLookupStrategy (org.mule.runtime.container.internal.ContainerOnlyLookupStrategy)2 DefaultModuleRepository (org.mule.runtime.container.internal.DefaultModuleRepository)2 MuleClassLoaderLookupPolicy (org.mule.runtime.container.internal.MuleClassLoaderLookupPolicy)2 ArtifactClassLoaderFilter (org.mule.runtime.module.artifact.api.classloader.ArtifactClassLoaderFilter)2 ChildFirstLookupStrategy (org.mule.runtime.module.artifact.api.classloader.ChildFirstLookupStrategy)2 DefaultArtifactClassLoaderFilter (org.mule.runtime.module.artifact.api.classloader.DefaultArtifactClassLoaderFilter)2 FilteringArtifactClassLoader (org.mule.runtime.module.artifact.api.classloader.FilteringArtifactClassLoader)2 MuleArtifactClassLoader (org.mule.runtime.module.artifact.api.classloader.MuleArtifactClassLoader)2