]> source.dussan.org Git - archiva.git/commitdiff
Remove content tests
authorJames William Dumay <jdumay@apache.org>
Fri, 5 Dec 2008 07:09:29 +0000 (07:09 +0000)
committerJames William Dumay <jdumay@apache.org>
Fri, 5 Dec 2008 07:09:29 +0000 (07:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-search-improvements@723624 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/search/DefaultCrossRepositorySearchTest.java
archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/search/FileContentIndexPopulator.java

index bfbe2b9af7f459b62b6357656b477ec5da9dfc4e..3b411d15ecc92879bcaf97ce84b9525a7f3c958d 100644 (file)
@@ -142,22 +142,6 @@ public class DefaultCrossRepositorySearchTest
         assertSearchResults( expectedRepos, expectedResults, search, "org", null, false );
     }
 
-    public void testSearchTerm_Junit()
-        throws Exception
-    {        
-        CrossRepositorySearch search = lookupCrossRepositorySearch();
-        
-        String expectedRepos[] = new String[] {
-            TEST_DEFAULT_REPO_ID
-        };
-        
-        String expectedResults[] = new String[] { 
-            "junit","junit2","junit3"
-        };
-        
-        assertSearchResults( expectedRepos, expectedResults, search, "junit", null, false );
-    }
-
     public void testSearchInvalidTerm()
         throws Exception
     {        
@@ -174,44 +158,6 @@ public class DefaultCrossRepositorySearchTest
         assertSearchResults( expectedRepos, expectedResults, search, "monosodium", null, false );
     }
     
-    public void testSearchWithinSearchResults()
-        throws Exception
-    {        
-        CrossRepositorySearch search = lookupCrossRepositorySearch();
-
-        String expectedRepos[] = new String[] {
-            TEST_DEFAULT_REPO_ID
-        };
-        
-        String expectedResults[] = new String[] { 
-            "org","org2","org3","org4","org5","org6","org7"
-        };
-        
-        // first search
-        assertSearchResults( expectedRepos, expectedResults, search, "org", null, false );
-        
-        List<String> previousSearchTerms = new ArrayList<String>();
-        previousSearchTerms.add( "org" );        
-        String secondSearchExpectedResults[] = new String[] { 
-            "org.apache.maven.archiva.record", "org.apache.maven.archiva.record2",
-                "org.apache.maven.archiva.record3", "org.apache.maven.archiva.record4",
-                "org.apache.maven.archiva.record5", "org.apache.maven.archiva.record6",
-                "org.apache.maven.archiva.record7" 
-        };
-        
-        //second search
-        assertSearchResults( expectedRepos, secondSearchExpectedResults, search, "org.apache.maven.archiva.record",
-                             previousSearchTerms, false );
-        
-        previousSearchTerms.add( "org.apache.maven.archiva.record" );
-        String thirdSearchExpectedResults[] = new String[] { 
-            "junit", "junit2", "junit3"
-        };
-        
-        //third search
-        assertSearchResults( expectedRepos, thirdSearchExpectedResults, search, "junit", previousSearchTerms, false );        
-    }
-    
     public void testSearchForClassesAndPackages()
         throws Exception
     {                
index c0dc214e88f888f7337b7f08bcbdef519a4a8ecb..12e2f4e6b14202c4c75d84e048e122548bb68c67 100644 (file)
@@ -78,16 +78,6 @@ public class FileContentIndexPopulator
         record.setRepositoryId( "test-repo" );
         record.setFilename( path );
 
-        try
-        {
-            record.setContents( FileUtils.readFileToString( pathToFile, null ) );
-        }
-        catch ( IOException e )
-        {
-            e.printStackTrace();
-            throw new AssertionFailedError( "Can't load test file contents: " + pathToFile.getAbsolutePath() );
-        }
-
         return record;
     }
 }