-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit test for deprecated constructor
Signed-off-by: Andrew Ross <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
server/src/test/java/org/opensearch/search/lookup/SearchLookupTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.search.lookup; | ||
|
||
import org.opensearch.index.mapper.MapperService; | ||
import org.opensearch.test.OpenSearchTestCase; | ||
|
||
import static org.mockito.Mockito.mock; | ||
|
||
public class SearchLookupTests extends OpenSearchTestCase { | ||
public void testDeprecatedConstructorShardId() { | ||
final SearchLookup searchLookup = new SearchLookup(mock(MapperService.class), (a, b) -> null); | ||
assertThrows(IllegalStateException.class, searchLookup::shardId); | ||
} | ||
} |