Class DatasetsWebServiceTicketsCursorTest

java.lang.Object
ubic.gemma.rest.DatasetsWebServiceTicketsCursorTest

@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) public class DatasetsWebServiceTicketsCursorTest extends Object
Unit tests for the cursor-pagination branch added to DatasetsWebService.getDatasetTickets(DatasetArg, CursorArg, LimitArg) as step 1p of CURSOR_PAGINATION_STEP1_PLAN.md. Pure Mockito — the goal is to verify the WebService routes cursor vs legacy modes to the right helper and emits the right response wrapper, not to retest the DAO (the keyset HQL is covered separately).

Mirrors the path-derived-constraint pattern of step 1k (DatasetsWebServiceSamplesCursorTest): the legacy mode is NOT offset-paginated for this endpoint — it returns an unpaginated ResponseDataObject<List<TicketValueObject>>. The cursor branch is therefore strictly additive (an opt-in via ?cursor=). The dataset-id scope (path-derived targetType = EXPRESSION_EXPERIMENT, targetId = ee.id) is preserved in both modes; the open-state restriction (OPEN/IN_PROGRESS) lives in the DAO and is cross-checked at the service edge.

Author:
phase3
  • Constructor Details

    • DatasetsWebServiceTicketsCursorTest

      public DatasetsWebServiceTicketsCursorTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp() throws Exception
      Throws:
      Exception
    • legacyModeWithoutCursorReturnsUnpaginatedResponseDataObject

      @Test public void legacyModeWithoutCursorReturnsUnpaginatedResponseDataObject()
    • cursorModeRoutesToCursorHelperAndReturnsCursorPaginatedResponse

      @Test public void cursorModeRoutesToCursorHelperAndReturnsCursorPaginatedResponse()
    • cursorModeDecodesCursorAndForwardsToService

      @Test public void cursorModeDecodesCursorAndForwardsToService()
    • cursorModePreservesDatasetScope

      @Test public void cursorModePreservesDatasetScope()
    • cursorModeEmptyPageProducesEmptyResponseWithNoCursors

      @Test public void cursorModeEmptyPageProducesEmptyResponseWithNoCursors()
    • cursorModePreservesAscendingIdOrderFromService

      @Test public void cursorModePreservesAscendingIdOrderFromService()