@Test public void updateDoNotUseFlagOfAnArtifactThatDoesNotExist(){ final RepositoryHandler repositoryHandler = mock(RepositoryHandler.class); final ArtifactHandler handler = new ArtifactHandler(repositoryHandler, mock(LicenseMatcher.class)); WebApplicationException exception = null; try { handler.updateDoNotUse("doesNotExit", true); }catch (WebApplicationException e){ exception = e; } assertNotNull(exception); assertEquals(Response.Status.NOT_FOUND.getStatusCode(), exception.getResponse().getStatus()); }
public void updateDoNotUse(final String gavc, final Boolean doNotUse) { final DbArtifact artifact = getArtifact(gavc); repositoryHandler.updateDoNotUse(artifact, doNotUse); }
ArtifactHandler { public void updateDoNotUse(final String gavc, final Boolean doNotUse) { final DbArtifact artifact = getArtifact(gavc); repositoryHandler.updateDoNotUse(artifact, doNotUse); } }
ArtifactHandler { public void updateDoNotUse(final String gavc, final Boolean doNotUse) { final DbArtifact artifact = getArtifact(gavc); repositoryHandler.updateDoNotUse(artifact, doNotUse); } ArtifactHandler(final RepositoryHandler repositoryHandler,
                           final LicenseMatcher matcher); }
ArtifactHandler { public void updateDoNotUse(final String gavc, final Boolean doNotUse) { final DbArtifact artifact = getArtifact(gavc); repositoryHandler.updateDoNotUse(artifact, doNotUse); } ArtifactHandler(final RepositoryHandler repositoryHandler,
                           final LicenseMatcher matcher); void store(final DbArtifact dbArtifact); void storeIfNew(final DbArtifact fromClient); void addLicense(final String gavc, final String licenseId); List<String> getArtifactGavcs(final FiltersHolder filters); List<String> getArtifactGroupIds(final FiltersHolder filters); List<String> getArtifactVersions(final String gavc); String getArtifactLastVersion(final String gavc); DbArtifact getArtifact(final String gavc); DbArtifact getArtifactUsingSHA256(final String sha256); DbModule getModule(final DbArtifact dbArtifact); DbOrganization getOrganization(final DbArtifact dbArtifact); void updateDownLoadUrl(final String gavc, final String downLoadUrl); void updateProvider(final String gavc, final String provider); void deleteArtifact(final String gavc); void updateDoNotUse(final String gavc, final Boolean doNotUse); List<DbModule> getAncestors(final String gavc, final FiltersHolder filters); List<DbLicense> getArtifactLicenses(final String gavc, final FiltersHolder filters); void addLicenseToArtifact(final String gavc, final String licenseId); void removeLicenseFromArtifact(final String gavc, final String licenseId); List<DbArtifact> getArtifacts(final FiltersHolder filters); String getModuleJenkinsJobInfo(final DbArtifact dbArtifact); }
ArtifactHandler { public void updateDoNotUse(final String gavc, final Boolean doNotUse) { final DbArtifact artifact = getArtifact(gavc); repositoryHandler.updateDoNotUse(artifact, doNotUse); } ArtifactHandler(final RepositoryHandler repositoryHandler,
                           final LicenseMatcher matcher); void store(final DbArtifact dbArtifact); void storeIfNew(final DbArtifact fromClient); void addLicense(final String gavc, final String licenseId); List<String> getArtifactGavcs(final FiltersHolder filters); List<String> getArtifactGroupIds(final FiltersHolder filters); List<String> getArtifactVersions(final String gavc); String getArtifactLastVersion(final String gavc); DbArtifact getArtifact(final String gavc); DbArtifact getArtifactUsingSHA256(final String sha256); DbModule getModule(final DbArtifact dbArtifact); DbOrganization getOrganization(final DbArtifact dbArtifact); void updateDownLoadUrl(final String gavc, final String downLoadUrl); void updateProvider(final String gavc, final String provider); void deleteArtifact(final String gavc); void updateDoNotUse(final String gavc, final Boolean doNotUse); List<DbModule> getAncestors(final String gavc, final FiltersHolder filters); List<DbLicense> getArtifactLicenses(final String gavc, final FiltersHolder filters); void addLicenseToArtifact(final String gavc, final String licenseId); void removeLicenseFromArtifact(final String gavc, final String licenseId); List<DbArtifact> getArtifacts(final FiltersHolder filters); String getModuleJenkinsJobInfo(final DbArtifact dbArtifact);  }