Class GeneWebServiceProbesCursorTest
java.lang.Object
ubic.gemma.rest.GeneWebServiceProbesCursorTest
@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class)
public class GeneWebServiceProbesCursorTest
extends Object
Unit tests for the cursor-pagination branch added to
GeneWebService.getGeneProbes(GeneArg, OffsetArg, LimitArg, CursorArg, boolean) as step 1m
of CURSOR_PAGINATION_STEP1_PLAN.md. Pure Mockito — the goal is to verify the
WebService routes cursor vs offset modes to the right helper and emits the right
response wrapper, not to retest the DAO (covered by the broader DAO-cursor suite).
Mirrors the step 1l PlatformsWebServiceElementGenesCursorTest structure, which
is the symmetric endpoint (probe→genes; this one is gene→probes). Differences:
- The offset variant already returns a
Slice<CompositeSequenceValueObject>(the service does the VO mapping), so the WebService doesn't need aSlice.map(loadValueObject)call — both modes simply forward. - The response wrappers are the bare
PaginatedResponseDataObjectandCursorPaginatedResponseDataObject(no path-derived filter is echoed back — matches the existing offset wrapper). - The cursor variant delegates to
GeneArgService.getGeneProbesByCursor(GeneArg, Cursor, int), which itself resolves the gene against the request (mirroring the offset callgeneArgService.getGeneProbes(geneArg, ...)).
- Author:
- phase3
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GeneWebServiceProbesCursorTest
public GeneWebServiceProbesCursorTest()
-
-
Method Details
-
setUp
@BeforeEach public void setUp() -
offsetModeRoutesToLegacyHelperAndReturnsPaginatedResponse
@Test public void offsetModeRoutesToLegacyHelperAndReturnsPaginatedResponse() -
cursorModeRoutesToCursorHelperAndReturnsCursorResponse
@Test public void cursorModeRoutesToCursorHelperAndReturnsCursorResponse() -
cursorModeDecodesCursorAndForwardsToArgService
@Test public void cursorModeDecodesCursorAndForwardsToArgService() -
cursorModeForwardsGeneArgUnchanged
@Test public void cursorModeForwardsGeneArgUnchanged() -
cursorModeEmptyPageProducesEmptyResponseWithNoNextCursor
@Test public void cursorModeEmptyPageProducesEmptyResponseWithNoNextCursor() -
cursorModePreservesAscendingIdOrderFromDao
@Test public void cursorModePreservesAscendingIdOrderFromDao()
-