Package org.sonatype.nexus.capability

Examples of org.sonatype.nexus.capability.CapabilityReference.capabilityAs()


      );
    }

    final CapabilityReference capabilityReference = capabilities.iterator().next();
    final GenerateMetadataCapabilityConfiguration configuration =
        capabilityReference.capabilityAs(GenerateMetadataCapability.class).getConfig();

    final String version = payload.toString();

    final Map<String, String> newAliases = Maps.newHashMap();
    newAliases.putAll(configuration.aliases());
View Full Code Here


    final CapabilityContext capabilityContext = mock(CapabilityContext.class);
    when(reference.context()).thenReturn(capabilityContext);
    when(capabilityContext.id()).thenReturn(CapabilityIdentity.capabilityIdentity("ID"));
    when(capabilityContext.isEnabled()).thenReturn(true);
    when(capabilityContext.notes()).thenReturn("Notes");
    when(reference.capabilityAs(GenerateMetadataCapability.class)).thenReturn(yumRepositoryCapability);
    Map<String, String> aliases = Maps.newHashMap();
    aliases.put("foo", "bar");
    when(yumRepositoryCapability.getConfig()).thenReturn(
        new GenerateMetadataCapabilityConfiguration(RELEASES, aliases, true, 1, "/comps.xml")
    );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.