Class PlatformsWebServiceElementCursorTest
java.lang.Object
ubic.gemma.rest.PlatformsWebServiceElementCursorTest
@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class)
public class PlatformsWebServiceElementCursorTest
extends Object
Unit tests for the cursor-pagination branch added to
PlatformsWebService.getPlatformElement(PlatformArg, CompositeSequenceArrayArg, OffsetArg, LimitArg, CursorArg, boolean, boolean)
as step 1j of CURSOR_PAGINATION_STEP1_PLAN.md. Pure Mockito — the goal is to verify
the WebService routes cursor vs offset modes to the right helper and emits the right
response wrapper, not to retest the DAO (covered by ExpressionExperimentDaoCursorTest
+ the broader DAO-cursor suite).
Mirrors PlatformsWebServiceElementsCursorTest (step 1e). Differences:
- This endpoint additionally narrows the CompositeSequenceValueObject listing to
the {probes} path-arg id/name set, which #getPlatformFilter() composes into a single Filter (both the
arrayDesign.id = ? platform-scope and the id IN (...) /
name IN (...) probe-set restriction live in that one Filter). The WebService
delegates filter composition to PlatformArgService.getElementsByCursor(PlatformArg, CompositeSequenceArrayArg, Cursor, int); the offset branch composes its Filters inline.
- The offset-mode response wrapper is FilteredAndPaginatedResponseDataObject (the
endpoint echoes the path-derived filter), so the cursor-mode response uses
FilteredAndCursorPaginatedResponseDataObject — same shape as
PlatformsWebServiceBlacklistedCursorTest / PlatformsWebServiceCursorTest.- Author:
- phase3
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PlatformsWebServiceElementCursorTest
public PlatformsWebServiceElementCursorTest()
-
-
Method Details
-
setUp
@BeforeEach public void setUp() -
offsetModeRoutesToLegacyHelperAndReturnsFilteredPaginatedResponse
@Test public void offsetModeRoutesToLegacyHelperAndReturnsFilteredPaginatedResponse() -
cursorModeRoutesToCursorHelperAndReturnsFilteredCursorResponse
@Test public void cursorModeRoutesToCursorHelperAndReturnsFilteredCursorResponse() -
cursorModeDecodesCursorAndForwardsToArgService
@Test public void cursorModeDecodesCursorAndForwardsToArgService() -
cursorModeForwardsBothPlatformArgAndProbesArg
@Test public void cursorModeForwardsBothPlatformArgAndProbesArg()
-