Skip to content

Commit cf2671e

Browse files
committed
refactored mocked plugin class out of IT class
1 parent 3281c79 commit cf2671e

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3777,12 +3777,4 @@ public FakeConstantFieldMapper.Builder getMergeBuilder() {
37773777
return new FakeConstantFieldMapper.Builder(mappedFieldType.name());
37783778
}
37793779
}
3780-
3781-
public static class MockConstantKeywordMapperPlugin extends Plugin implements MapperPlugin {
3782-
@Override
3783-
public Map<String, Mapper.TypeParser> getMappers() {
3784-
return singletonMap(FakeConstantFieldType.CONTENT_TYPE, FakeConstantFieldMapper.PARSER);
3785-
}
3786-
3787-
}
37883780
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
package org.elasticsearch.search.fetch.subphase.highlight;
10+
11+
import org.elasticsearch.index.mapper.Mapper;
12+
import org.elasticsearch.plugins.MapperPlugin;
13+
import org.elasticsearch.plugins.Plugin;
14+
15+
import java.util.Map;
16+
17+
import static java.util.Collections.singletonMap;
18+
19+
public class MockConstantKeywordMapperPlugin extends Plugin implements MapperPlugin {
20+
@Override
21+
public Map<String, Mapper.TypeParser> getMappers() {
22+
return singletonMap(HighlighterSearchIT.FakeConstantFieldType.CONTENT_TYPE, HighlighterSearchIT.FakeConstantFieldMapper.PARSER);
23+
}
24+
25+
}

0 commit comments

Comments
 (0)