From 2211cb809df3365b1e646d27661264ddb9ca8b6f Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Wed, 10 Mar 2010 04:27:51 +0000 Subject: [PATCH] [MRM-1360] move type population into Maven 2 plugin - correct problem with test case git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@921228 13f79535-47bb-0310-9956-ffa450edef68 --- .../xmlrpc/services/SearchServiceImplTest.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 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 45d3f12c6..79194af45 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 @@ -20,12 +20,6 @@ package org.apache.archiva.web.xmlrpc.services; */ -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.List; - import org.apache.archiva.indexer.search.RepositorySearch; import org.apache.archiva.indexer.search.SearchResultHit; import org.apache.archiva.indexer.search.SearchResultLimits; @@ -36,6 +30,7 @@ import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.metadata.model.ProjectVersionReference; import org.apache.archiva.metadata.repository.MetadataRepository; import org.apache.archiva.metadata.repository.MetadataResolver; +import org.apache.archiva.metadata.repository.storage.maven2.MavenArtifactFacet; import org.apache.archiva.metadata.repository.storage.maven2.MavenProjectFacet; import org.apache.archiva.web.xmlrpc.api.SearchService; import org.apache.archiva.web.xmlrpc.api.beans.Artifact; @@ -45,6 +40,12 @@ import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; import org.easymock.classextension.MockClassControl; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.List; + /** * SearchServiceImplTest * @@ -548,6 +549,11 @@ public class SearchServiceImplTest artifactMetadata.setMd5( CHECKSUM ); artifactMetadata.setWhenGathered( whenGathered ); artifactMetadata.setRepositoryId( TEST_REPO ); + + MavenArtifactFacet facet = new MavenArtifactFacet(); + facet.setType( "jar" ); + artifactMetadata.addFacet( facet ); + return artifactMetadata; } } \ No newline at end of file