@Test public void testEffectiveNonResolveCapsMatchRequirementWithSame() throws Exception { assertTrue("effective should match: req=blah, cap=blah", PluginResolveContext.match( createRequirement("foo", "(foo=bar)", "blah"), createCapability("foo", "blah", new HashMap<String,Object>() {{ put("foo", "bar"); }}) )); assertFalse("effective should NOT match: req=default, cap=blah", PluginResolveContext.match( createRequirement("foo", "(foo=bar)", null), createCapability("foo", "blah", new HashMap<String,Object>() {{ put("foo", "bar"); }}) )); assertFalse("effective should NOT match: req=default, cap=blah", PluginResolveContext.match( createRequirement("foo", "(foo=bar)", "resolve"), createCapability("foo", "blah", new HashMap<String,Object>() {{ put("foo", "bar"); }}) )); assertFalse("effective should NOT match: req=wibble, cap=blah", PluginResolveContext.match( createRequirement("foo", "(foo=bar)", "wibble"), createCapability("foo", "blah", new HashMap<String,Object>() {{ put("foo", "bar"); }}) )); }
static boolean match(Requirement requirement, Capability capability) { return match(requirement, capability, null); }
PluginResolveContext extends ResolveContext { static boolean match(Requirement requirement, Capability capability) { return match(requirement, capability, null); } }
PluginResolveContext extends ResolveContext { static boolean match(Requirement requirement, Capability capability) { return match(requirement, capability, null); } PluginResolveContext(BundleContext bundleContext, ResolveRequest request, LogService log); }
PluginResolveContext extends ResolveContext { static boolean match(Requirement requirement, Capability capability) { return match(requirement, capability, null); } PluginResolveContext(BundleContext bundleContext, ResolveRequest request, LogService log); @Override Collection<Resource> getMandatoryResources(); @Override List<Capability> findProviders(Requirement requirement); @Override int insertHostedCapability(List<Capability> capabilities, HostedCapability hc); @Override boolean isEffective(Requirement requirement); @Override Map<Resource, Wiring> getWirings(); }
PluginResolveContext extends ResolveContext { static boolean match(Requirement requirement, Capability capability) { return match(requirement, capability, null); } PluginResolveContext(BundleContext bundleContext, ResolveRequest request, LogService log); @Override Collection<Resource> getMandatoryResources(); @Override List<Capability> findProviders(Requirement requirement); @Override int insertHostedCapability(List<Capability> capabilities, HostedCapability hc); @Override boolean isEffective(Requirement requirement); @Override Map<Resource, Wiring> getWirings();  }