From fb7b1842b3e7da8e3973ed57292dfa7aa6e8aefe Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 30 May 2012 16:05:53 +0000 Subject: [PATCH] fix junit git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1344324 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/archiva/rest/services/BrowseServiceTest.java | 4 ++-- .../archiva/rest/services/RepositoriesServiceTest.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java index 79e1aba95..b37f735d6 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java @@ -19,8 +19,8 @@ package org.apache.archiva.rest.services; */ import org.apache.archiva.metadata.model.ProjectVersionMetadata; +import org.apache.archiva.rest.api.model.Artifact; import org.apache.archiva.rest.api.model.ArtifactContentEntry; -import org.apache.archiva.rest.api.model.ArtifactDownloadInfo; import org.apache.archiva.rest.api.model.BrowseResult; import org.apache.archiva.rest.api.model.BrowseResultEntry; import org.apache.archiva.rest.api.model.Entry; @@ -346,7 +346,7 @@ public class BrowseServiceTest BrowseService browseService = getBrowseService( authorizationHeader, true ); - List artifactDownloadInfos = + List artifactDownloadInfos = browseService.getArtifactDownloadInfos( "commons-logging", "commons-logging", "1.1", testRepoId ); log.info( "artifactDownloadInfos {}", artifactDownloadInfos ); diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java index c0ad360aa..13a68befa 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java @@ -83,10 +83,11 @@ public class RepositoriesServiceTest artifact.setArtifactId( "commons-logging" ); artifact.setVersion( "1.0.1" ); artifact.setPackaging( "jar" ); + artifact.setContext( SOURCE_REPO_ID ); RepositoriesService repositoriesService = getRepositoriesService( null ); - repositoriesService.deleteArtifact( artifact, SOURCE_REPO_ID ); + repositoriesService.deleteArtifact( artifact ); } catch ( ServerWebApplicationException e ) { @@ -111,7 +112,7 @@ public class RepositoriesServiceTest artifact.setVersion( "1.0.1" ); artifact.setPackaging( "jar" ); - repositoriesService.deleteArtifact( artifact, null ); + repositoriesService.deleteArtifact( artifact ); } catch ( ServerWebApplicationException e ) { @@ -138,10 +139,11 @@ public class RepositoriesServiceTest artifact.setArtifactId( "commons-logging" ); artifact.setVersion( "1.0.1" ); artifact.setPackaging( "jar" ); + artifact.setContext( SOURCE_REPO_ID ); RepositoriesService repositoriesService = getRepositoriesService( authorizationHeader ); - repositoriesService.deleteArtifact( artifact, SOURCE_REPO_ID ); + repositoriesService.deleteArtifact( artifact ); assertFalse( "artifact not deleted exists:" + artifactFile.getPath(), artifactFile.exists() );