Class PlatformsWebServiceTicketsCursorTest
java.lang.Object
ubic.gemma.rest.PlatformsWebServiceTicketsCursorTest
@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class)
public class PlatformsWebServiceTicketsCursorTest
extends Object
Unit tests for the cursor-pagination branch added to
PlatformsWebService.getPlatformTickets(PlatformArg, CursorArg, LimitArg)
as step 1s 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 by the TicketDao tests added
in step 1p).
Mirrors DatasetsWebServiceTicketsCursorTest (step 1p) with target
type TicketTargetType.ARRAY_DESIGN instead of
TicketTargetType.EXPRESSION_EXPERIMENT: 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 platform-id scope (path-derived targetType = ARRAY_DESIGN,
targetId = ad.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 Summary
Constructors -
Method Summary
-
Constructor Details
-
PlatformsWebServiceTicketsCursorTest
public PlatformsWebServiceTicketsCursorTest()
-
-
Method Details
-
setUp
-
legacyModeWithoutCursorReturnsUnpaginatedResponseDataObject
@Test public void legacyModeWithoutCursorReturnsUnpaginatedResponseDataObject() -
cursorModeRoutesToCursorHelperAndReturnsCursorPaginatedResponse
@Test public void cursorModeRoutesToCursorHelperAndReturnsCursorPaginatedResponse() -
cursorModeDecodesCursorAndForwardsToService
@Test public void cursorModeDecodesCursorAndForwardsToService() -
cursorModePreservesPlatformScope
@Test public void cursorModePreservesPlatformScope() -
cursorModeEmptyPageProducesEmptyResponseWithNoCursors
@Test public void cursorModeEmptyPageProducesEmptyResponseWithNoCursors() -
cursorModePreservesAscendingIdOrderFromService
@Test public void cursorModePreservesAscendingIdOrderFromService()
-