Package org.sonatype.nexus.capability

Examples of org.sonatype.nexus.capability.CapabilityFactory.create()


    final ValidatorRegistryProvider validatorRegistryProvider = mock(ValidatorRegistryProvider.class);
    final ValidatorRegistry validatorRegistry = mock(ValidatorRegistry.class);
    when(validatorRegistryProvider.get()).thenReturn(validatorRegistry);

    final CapabilityFactory factory = mock(CapabilityFactory.class);
    when(factory.create()).thenAnswer(new Answer<Capability>()
    {
      @Override
      public Capability answer(final InvocationOnMock invocation)
          throws Throwable
      {
View Full Code Here


    final CapabilityFactory factory = capabilityFactoryRegistry.get(type);
    if (factory == null) {
      throw new RuntimeException(format("No factory found for a capability of type %s", type));
    }

    final Capability capability = factory.create();

    final DefaultCapabilityReference reference = createReference(id, type, descriptor, capability);

    references.put(id, reference);
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.