Class DatasetsWebServiceAuditEventsCursorTest
java.lang.Object
ubic.gemma.rest.DatasetsWebServiceAuditEventsCursorTest
@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class)
public class DatasetsWebServiceAuditEventsCursorTest
extends Object
Unit tests for the cursor-pagination branch added to
DatasetsWebService.getDatasetAuditEvents(DatasetArg, CursorArg, LimitArg, boolean, boolean)
as step 1q 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) and step 1p
(DatasetsWebServiceTicketsCursorTest): the legacy mode is NOT
offset-paginated for this endpoint — it returns an unpaginated
ResponseDataObject<List<AuditEventValueObject>>. The cursor
branch is therefore strictly additive (an opt-in via ?cursor=). The
dataset (auditable) scope is preserved in both modes; cursor mode forces
id-asc ordering inside the DAO.
- Author:
- phase3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidsetUp()
-
Constructor Details
-
DatasetsWebServiceAuditEventsCursorTest
public DatasetsWebServiceAuditEventsCursorTest()
-
-
Method Details
-
setUp
-
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() -
legacyModeWithoutLimitReturnsTheWholeTrail
-
legacyModeLimitReturnsTheMostRecentEntries
-
legacyModeLimitAppliesAfterExcludeEmpty
-
legacyModeLimitAppliesAfterCompact
-
cursorModeWithoutLimitUsesTheDefaultPageSize
@Test public void cursorModeWithoutLimitUsesTheDefaultPageSize()
-