use of org.eclipse.egit.ui.internal.search.CommitSearchResult in project egit by eclipse.
the class CommitSearchQueryTest method validateResult.
private void validateResult(RevCommit expectedCommit, Repository expectedRepository, ISearchResult result) {
assertNotNull(result);
assertTrue(result instanceof CommitSearchResult);
CommitSearchResult commitResult = (CommitSearchResult) result;
assertEquals(1, commitResult.getMatchCount());
Object[] elements = commitResult.getElements();
assertNotNull(elements);
assertEquals(1, elements.length);
assertTrue(elements[0] instanceof RepositoryCommit);
RepositoryCommit repoCommit = (RepositoryCommit) elements[0];
assertEquals(expectedRepository.getDirectory(), repoCommit.getRepository().getDirectory());
assertEquals(expectedCommit, repoCommit.getRevCommit());
}
use of org.eclipse.egit.ui.internal.search.CommitSearchResult in project egit by eclipse.
the class CommitSearchQueryTest method validateEmpty.
private void validateEmpty(ISearchResult result) {
assertNotNull(result);
assertTrue(result instanceof CommitSearchResult);
CommitSearchResult commitResult = (CommitSearchResult) result;
assertEquals(0, commitResult.getMatchCount());
Object[] elements = commitResult.getElements();
assertNotNull(elements);
assertEquals(0, elements.length);
}
Aggregations