summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2009-11-30 03:32:58 +0000
committerBrett Porter <brett@apache.org>2009-11-30 03:32:58 +0000
commit711db6f5afaca08a2758918c445ca1298d06edd4 (patch)
tree6235f88a7a41e15a75d4e1170258ffd1d747e3f1
parent112223260ede1dc2e0d91e6723e151acc42fca41 (diff)
downloadarchiva-711db6f5afaca08a2758918c445ca1298d06edd4.tar.gz
archiva-711db6f5afaca08a2758918c445ca1298d06edd4.zip
[MRM-1288] correction to adjusted getDependees() test
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@885326 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java
index 208eb036c..f915d5701 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java
@@ -21,6 +21,7 @@ package org.apache.archiva.web.xmlrpc.services;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Date;
import java.util.List;
@@ -606,31 +607,23 @@ public class SearchServiceImplTest
public void testGetDependeesArtifactDoesNotExist()
throws Exception
{
- Date date = new Date();
List<String> observableRepoIds = new ArrayList<String>();
observableRepoIds.add( "repo1.mirror" );
observableRepoIds.add( "public.releases" );
+ // no longer differentiating between a project not being present and a project that is present but with
+ // no references. If it is later determined to be needed, we will need to modify the metadata content repository
userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
metadataResolverControl.expectAndReturn(
metadataResolver.getProjectReferences( "repo1.mirror", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID,
- "1.0" ), null );
+ "1.0" ), Collections.<ProjectVersionReference>emptyList() );
metadataResolverControl.expectAndReturn(
metadataResolver.getProjectReferences( "public.releases", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID,
- "1.0" ), null );
+ "1.0" ), Collections.<ProjectVersionReference>emptyList() );
- repoBrowsingControl.replay();
userReposControl.replay();
+ metadataResolverControl.replay();
- try
- {
- searchService.getDependees( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0" );
- fail( "An exception should have been thrown." );
- }
- catch ( Exception e )
- {
- repoBrowsingControl.verify();
- userReposControl.verify();
- }
+ assertTrue( searchService.getDependees( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0" ).isEmpty() );
}
} \ No newline at end of file