Tests: Renaming InternalSearchHitsTests to SearchHitsTests

The class under test changed its name from InternalSearchHit(s) to just
SearchHit(s), renaming the tests accordingly.
This commit is contained in:
Christoph Büscher 2017-02-09 14:17:21 +01:00
parent 3553522328
commit b85fa54ee7
2 changed files with 5 additions and 5 deletions

View File

@ -34,9 +34,9 @@ import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.search.SearchHit.NestedIdentity;
import org.elasticsearch.search.fetch.subphase.highlight.HighlightField;
import org.elasticsearch.search.fetch.subphase.highlight.HighlightFieldTests;
import org.elasticsearch.search.SearchHit.NestedIdentity;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.RandomObjects;
@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
public class InternalSearchHitTests extends ESTestCase {
public class SearchHitTests extends ESTestCase {
private static Set<String> META_FIELDS = Sets.newHashSet("_uid", "_all", "_parent", "_routing", "_size", "_timestamp", "_ttl");
@ -122,7 +122,7 @@ public class InternalSearchHitTests extends ESTestCase {
int innerHitsSize = randomIntBetween(0, 3);
Map<String, SearchHits> innerHits = new HashMap<>(innerHitsSize);
for (int i = 0; i < innerHitsSize; i++) {
innerHits.put(randomAsciiOfLength(5), InternalSearchHitsTests.createTestItem());
innerHits.put(randomAsciiOfLength(5), SearchHitsTests.createTestItem());
}
hit.setInnerHits(innerHits);
}

View File

@ -34,13 +34,13 @@ import java.util.Collections;
import static org.elasticsearch.common.xcontent.XContentHelper.toXContent;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent;
public class InternalSearchHitsTests extends ESTestCase {
public class SearchHitsTests extends ESTestCase {
public static SearchHits createTestItem() {
int searchHits = randomIntBetween(0, 5);
SearchHit[] hits = new SearchHit[searchHits];
for (int i = 0; i < searchHits; i++) {
hits[i] = InternalSearchHitTests.createTestItem(false); // creating random innerHits could create loops
hits[i] = SearchHitTests.createTestItem(false); // creating random innerHits could create loops
}
long totalHits = randomLong();
float maxScore = frequently() ? randomFloat() : Float.NaN;