package org.sonar.server.computation.step;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.*;
import org.sonar.api.config.Settings;
import org.sonar.api.resources.Qualifiers;
import org.sonar.core.component.ComponentDto;
sut.execute(context);
- List<String> viewUuids = esTester.getDocumentFields(ViewIndexDefinition.INDEX, ViewIndexDefinition.TYPE_VIEW, ViewIndexDefinition.FIELD_UUID);
+ List<String> viewUuids = esTester.getDocumentFieldValues(ViewIndexDefinition.INDEX, ViewIndexDefinition.TYPE_VIEW, ViewIndexDefinition.FIELD_UUID);
assertThat(viewUuids).containsOnly("ABCD", "BCDE");
}
/**
* Get a list of a specific field from all indexed documents.
*/
- public <T> List<T> getDocumentFields(String indexName, String typeName, final String fieldNameToReturn) {
+ public <T> List<T> getDocumentFieldValues(String indexName, String typeName, final String fieldNameToReturn) {
return newArrayList(Iterables.transform(getDocuments(indexName, typeName), new Function<SearchHit, T>() {
@Override
public T apply(SearchHit input) {