@Test public void componentHashsumShouldReturnHashsum() throws Exception { String aHash = "abcd1234"; when(anAsset.blob()).thenReturn(of(assetBlob)); when(assetBlob.checksums()).thenReturn(singletonMap(SHA1.name(), aHash)); Optional<String> componentHashsum = underTest.getComponentHashsumForProxyRepo(repository, context); assertThat(componentHashsum, is(of(aHash))); }
@Override protected Optional<String> getComponentHashsumForProxyRepo(final Repository repository, final Context context) throws TarballLoadingException { try { return getComponentHashsum(repository, context); } catch (IOException e) { throw new TarballLoadingException(e.getMessage()); } }
DataStoreNpmAuditTarballFacet extends NpmAuditTarballFacet { @Override protected Optional<String> getComponentHashsumForProxyRepo(final Repository repository, final Context context) throws TarballLoadingException { try { return getComponentHashsum(repository, context); } catch (IOException e) { throw new TarballLoadingException(e.getMessage()); } } }
DataStoreNpmAuditTarballFacet extends NpmAuditTarballFacet { @Override protected Optional<String> getComponentHashsumForProxyRepo(final Repository repository, final Context context) throws TarballLoadingException { try { return getComponentHashsum(repository, context); } catch (IOException e) { throw new TarballLoadingException(e.getMessage()); } } @Inject  DataStoreNpmAuditTarballFacet(
      @Named("${nexus.npm.audit.maxConcurrentRequests:-10}") final int maxConcurrentRequests); }
DataStoreNpmAuditTarballFacet extends NpmAuditTarballFacet { @Override protected Optional<String> getComponentHashsumForProxyRepo(final Repository repository, final Context context) throws TarballLoadingException { try { return getComponentHashsum(repository, context); } catch (IOException e) { throw new TarballLoadingException(e.getMessage()); } } @Inject  DataStoreNpmAuditTarballFacet(
      @Named("${nexus.npm.audit.maxConcurrentRequests:-10}") final int maxConcurrentRequests);  }
DataStoreNpmAuditTarballFacet extends NpmAuditTarballFacet { @Override protected Optional<String> getComponentHashsumForProxyRepo(final Repository repository, final Context context) throws TarballLoadingException { try { return getComponentHashsum(repository, context); } catch (IOException e) { throw new TarballLoadingException(e.getMessage()); } } @Inject  DataStoreNpmAuditTarballFacet(
      @Named("${nexus.npm.audit.maxConcurrentRequests:-10}") final int maxConcurrentRequests);   }