Skip to content

Commit

Permalink
Extrapolate strings to constants
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bogan <[email protected]>
  • Loading branch information
ryanbogan authored and martin-gaievski committed Nov 24, 2024
1 parent dcfa374 commit 24c7fa8
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,20 @@ public class RRFProcessorTests extends OpenSearchTestCase {
private QueryPhaseResultConsumer mockQueryPhaseResultConsumer;

private RRFProcessor rrfProcessor;
private static final String TAG = "tag";
private static final String DESCRIPTION = "description";

@Before
@SneakyThrows
public void setUp() {
super.setUp();
MockitoAnnotations.openMocks(this);
rrfProcessor = new RRFProcessor(
"tag",
"description",
mockNormalizationTechnique,
mockCombinationTechnique,
mockNormalizationWorkflow
);
rrfProcessor = new RRFProcessor(TAG, DESCRIPTION, mockNormalizationTechnique, mockCombinationTechnique, mockNormalizationWorkflow);
}

@SneakyThrows
public void testGetType() {
assertEquals("score-ranker-processor", rrfProcessor.getType());
assertEquals(RRFProcessor.TYPE, rrfProcessor.getType());
}

@SneakyThrows
Expand Down Expand Up @@ -135,12 +131,12 @@ public void testProcess_whenValidNonHybridInput_thenSucceed() {

@SneakyThrows
public void testGetTag() {
assertEquals("tag", rrfProcessor.getTag());
assertEquals(TAG, rrfProcessor.getTag());
}

@SneakyThrows
public void testGetDescription() {
assertEquals("description", rrfProcessor.getDescription());
assertEquals(DESCRIPTION, rrfProcessor.getDescription());
}

@SneakyThrows
Expand Down

0 comments on commit 24c7fa8

Please sign in to comment.