Class TicketsWebServiceEventsCursorTest

java.lang.Object
ubic.gemma.rest.TicketsWebServiceEventsCursorTest

@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) public class TicketsWebServiceEventsCursorTest extends Object
Unit tests for the cursor-pagination branch added to TicketsWebService.getTicketEvents(Long, CursorArg, LimitArg) as step 1r 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 1q (DatasetsWebServiceAuditEventsCursorTest): the legacy mode is NOT offset-paginated for this endpoint — it returns an unpaginated ResponseDataObject<List<TicketEventValueObject>>. The cursor branch is therefore strictly additive (an opt-in via ?cursor=). The ticket scope is preserved in both modes; cursor mode forces id-asc ordering inside the DAO.

Author:
phase3
  • Constructor Details

    • TicketsWebServiceEventsCursorTest

      public TicketsWebServiceEventsCursorTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp()
    • legacyModeWithoutCursorReturnsUnpaginatedResponseDataObject

      @Test public void legacyModeWithoutCursorReturnsUnpaginatedResponseDataObject()
    • cursorModeRoutesToCursorHelperAndReturnsCursorPaginatedResponse

      @Test public void cursorModeRoutesToCursorHelperAndReturnsCursorPaginatedResponse()
    • cursorModeDecodesCursorAndForwardsToService

      @Test public void cursorModeDecodesCursorAndForwardsToService()
    • cursorModePreservesTicketScope

      @Test public void cursorModePreservesTicketScope()
    • cursorModeEmptyPageProducesEmptyResponseWithNoCursors

      @Test public void cursorModeEmptyPageProducesEmptyResponseWithNoCursors()
    • cursorModePreservesAscendingIdOrderFromService

      @Test public void cursorModePreservesAscendingIdOrderFromService()