Class TaxaWebServiceGeneProbesCursorTest
java.lang.Object
ubic.gemma.rest.TaxaWebServiceGeneProbesCursorTest
@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class)
public class TaxaWebServiceGeneProbesCursorTest
extends Object
Unit tests for the cursor-pagination branch added to
TaxaWebService.getTaxonGeneProbes(TaxonArg, GeneArg, OffsetArg, LimitArg, CursorArg)
as step 1n 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 from step 1m).
Symmetric to GeneWebServiceProbesCursorTest (step 1m, the non-taxon-scoped variant of
the same endpoint). Differences:
- This endpoint takes both a
{taxon}path arg and a{gene}path arg; the taxon is resolved by the WebService viaTaxonArgService#getEntity(TaxonArg)and then passed toGeneArgService.getGeneProbesInTaxonByCursor(GeneArg, Taxon, Cursor, int), which itself resolves the gene with-taxon at the same time so the path-derived taxon scope is enforced identically in both modes. - The offset variant returns a
Sliceand the cursor variant returns aCursorPage— both ofCompositeSequenceValueObject, matching step 1m's gene→probes endpoint exactly.
- Author:
- phase3
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TaxaWebServiceGeneProbesCursorTest
public TaxaWebServiceGeneProbesCursorTest()
-
-
Method Details
-
setUp
@BeforeEach public void setUp() -
offsetModeRoutesToLegacyHelperAndReturnsPaginatedResponse
@Test public void offsetModeRoutesToLegacyHelperAndReturnsPaginatedResponse() -
cursorModeRoutesToCursorHelperAndReturnsCursorResponse
@Test public void cursorModeRoutesToCursorHelperAndReturnsCursorResponse() -
cursorModeDecodesCursorAndForwardsToArgService
@Test public void cursorModeDecodesCursorAndForwardsToArgService() -
cursorModeForwardsResolvedTaxonAndGeneArgUnchanged
@Test public void cursorModeForwardsResolvedTaxonAndGeneArgUnchanged() -
cursorModeEmptyPageProducesEmptyResponseWithNoNextCursor
@Test public void cursorModeEmptyPageProducesEmptyResponseWithNoNextCursor() -
cursorModePreservesAscendingIdOrderFromDao
@Test public void cursorModePreservesAscendingIdOrderFromDao()
-