Class DatasetsWebServiceExpressionLevelsForGeneCursorTest
java.lang.Object
ubic.gemma.rest.DatasetsWebServiceExpressionLevelsForGeneCursorTest
@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class)
public class DatasetsWebServiceExpressionLevelsForGeneCursorTest
extends Object
Unit tests for the cursor-pagination branch added to
DatasetsWebService.getDatasetsExpressionLevelsForGene(GeneArg, ubic.gemma.rest.util.args.QueryArg, FilterArg, OffsetArg, LimitArg, Boolean, ubic.gemma.rest.util.args.ExpLevelConsolidationArg, CursorArg, Boolean)
and its taxon-scoped sibling, as step 1v of CURSOR_PAGINATION_STEP1_PLAN.md.
Pure Mockito - the WebService picks cursor vs offset mode and emits the right wrapper.
The cursor windowing is in-memory over the +id-sorted datasetIds list returned by
ExpressionExperimentService.loadIdsWithCache, so this test exercises the slice
predicate (id > lastSeenId for forward, id < lastSeenId for backward) and the
limit+1 over-read used to detect hasMore.
- Author:
- phase3
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DatasetsWebServiceExpressionLevelsForGeneCursorTest
public DatasetsWebServiceExpressionLevelsForGeneCursorTest()
-
-
Method Details
-
setUp
@BeforeEach public void setUp() -
offsetModeRoutesToLegacyHelperAndReturnsQueriedFilteredInferredPaginatedResponse
@Test public void offsetModeRoutesToLegacyHelperAndReturnsQueriedFilteredInferredPaginatedResponse() -
cursorModeFirstPageReturnsAscendingIdsAndEmitsNextCursorWhenMore
@Test public void cursorModeFirstPageReturnsAscendingIdsAndEmitsNextCursorWhenMore() -
cursorModeLastPageOmitsNextCursor
@Test public void cursorModeLastPageOmitsNextCursor() -
cursorModeEmptyDatasetIdsRoundTripsEmptyPage
@Test public void cursorModeEmptyDatasetIdsRoundTripsEmptyPage() -
cursorModeBackwardWalkReversesOrderAndYieldsAscendingPage
@Test public void cursorModeBackwardWalkReversesOrderAndYieldsAscendingPage() -
cursorModeInferredTermsEchoedInResponse
@Test public void cursorModeInferredTermsEchoedInResponse() -
cursorModeForwardsGeneEntityResolution
@Test public void cursorModeForwardsGeneEntityResolution() -
cursorModeRejectsMismatchedSortSpec
@Test public void cursorModeRejectsMismatchedSortSpec()
-