mirror of
https://github.com/apache/archiva.git
synced 2025-02-06 18:19:02 +00:00
Remove content tests
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-search-improvements@723624 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d53eab3b32
commit
1368d14cd6
@ -142,22 +142,6 @@ public void testSearchTerm_Org()
|
||||
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 void testSearchInvalidTerm()
|
||||
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
|
||||
{
|
||||
|
@ -78,16 +78,6 @@ private FileContentRecord createFileContentRecord( File repoDir, String path )
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user