]> source.dussan.org Git - sonarqube.git/commitdiff
Rename method
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 3 Mar 2015 10:29:10 +0000 (11:29 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 3 Mar 2015 10:29:10 +0000 (11:29 +0100)
server/sonar-server/src/test/java/org/sonar/server/computation/step/PurgeRemovedViewsStepTest.java
server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java

index a490894a654ed6ed750027aca88a19158d290d92..86fce27ddb21959f084fe7ff2194f4ad085b9b9f 100644 (file)
 
 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;
@@ -89,7 +85,7 @@ public class PurgeRemovedViewsStepTest extends BaseStepTest {
 
     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");
   }
 
index 4395dff39fb86dbbd5d89bd1062261351808c6a3..09aaf8cd403ba2b1f99f0deff010bec45771599e 100644 (file)
@@ -209,7 +209,7 @@ public class EsTester extends ExternalResource {
   /**
    * 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) {