Search in sources :

Example 1 with ModuleQuery

use of org.eclipse.ceylon.cmr.api.ModuleQuery in project ceylon by eclipse.

the class AbstractTest method testComplete.

protected void testComplete(String query, ModuleDetails[] expected, RepositoryManager manager, ModuleQuery.Type type, ModuleQuery.Retrieval retrieval, Integer jvmBinaryMajor, Integer jvmBinaryMinor, Integer jsBinaryMajor, Integer jsBinaryMinor, String memberSearch) {
    ModuleQuery lookup = new ModuleQuery(query, type, retrieval);
    lookup.setJvmBinaryMajor(jvmBinaryMajor);
    lookup.setJvmBinaryMinor(jvmBinaryMinor);
    lookup.setJsBinaryMajor(jsBinaryMajor);
    lookup.setJsBinaryMinor(jsBinaryMinor);
    lookup.setMemberName(memberSearch);
    ModuleSearchResult result = manager.completeModules(lookup);
    compareSearchResults(expected, result);
}
Also used : ModuleQuery(org.eclipse.ceylon.cmr.api.ModuleQuery) ModuleSearchResult(org.eclipse.ceylon.cmr.api.ModuleSearchResult)

Example 2 with ModuleQuery

use of org.eclipse.ceylon.cmr.api.ModuleQuery in project ceylon by eclipse.

the class AbstractTest method testSearchResultsMember.

protected ModuleSearchResult testSearchResultsMember(String q, Type type, String members, boolean memberSearchExact, boolean memberSearchPackageOnly, ModuleDetails[] expected) throws Exception {
    ModuleQuery query = new ModuleQuery(q, type, Retrieval.ANY);
    query.setMemberName(members);
    query.setMemberSearchExact(memberSearchExact);
    query.setMemberSearchPackageOnly(memberSearchPackageOnly);
    RepositoryManager manager = getRepositoryManager();
    ModuleSearchResult results = manager.searchModules(query);
    compareSearchResults(expected, results);
    return results;
}
Also used : ModuleQuery(org.eclipse.ceylon.cmr.api.ModuleQuery) RepositoryManager(org.eclipse.ceylon.cmr.api.RepositoryManager) ModuleSearchResult(org.eclipse.ceylon.cmr.api.ModuleSearchResult)

Example 3 with ModuleQuery

use of org.eclipse.ceylon.cmr.api.ModuleQuery in project ceylon by eclipse.

the class AbstractTest method testSearchResults.

protected ModuleSearchResult testSearchResults(String q, Type type, Retrieval retrieval, ModuleDetails[] expected, Long start, Long count, RepositoryManager manager, long[] pagingInfo, Integer jvmBinaryMajor, Integer jvmBinaryMinor, Integer jsBinaryMajor, Integer jsBinaryMinor) throws Exception {
    ModuleQuery query = new ModuleQuery(q, type, retrieval);
    query.setStart(start);
    query.setCount(count);
    query.setPagingInfo(pagingInfo);
    query.setJvmBinaryMajor(jvmBinaryMajor);
    query.setJvmBinaryMinor(jvmBinaryMinor);
    query.setJsBinaryMajor(jsBinaryMajor);
    query.setJsBinaryMinor(jsBinaryMinor);
    ModuleSearchResult results = manager.searchModules(query);
    compareSearchResults(expected, results);
    return results;
}
Also used : ModuleQuery(org.eclipse.ceylon.cmr.api.ModuleQuery) ModuleSearchResult(org.eclipse.ceylon.cmr.api.ModuleSearchResult)

Aggregations

ModuleQuery (org.eclipse.ceylon.cmr.api.ModuleQuery)3 ModuleSearchResult (org.eclipse.ceylon.cmr.api.ModuleSearchResult)3 RepositoryManager (org.eclipse.ceylon.cmr.api.RepositoryManager)1