Class TaxaWebServiceGenesCursorTest

java.lang.Object
ubic.gemma.rest.TaxaWebServiceGenesCursorTest

@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) public class TaxaWebServiceGenesCursorTest extends Object
Unit tests for the cursor-pagination branch added to TaxaWebService.getTaxonGenes(TaxonArg, OffsetArg, LimitArg, CursorArg) as step 1g 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 the broader DAO-cursor suite). Mirrors PlatformsWebServiceDatasetsCursorTest (step 1f, closest analog — same shape: path-derived scope filter, no echoed user ?filter=, so cursor mode emits a plain CursorPaginatedResponseDataObject not a Filtered one). Differences: - The listing returns genes for the taxon, not experiments; the path-derived constraint is taxon.id = ? (composed inside GeneArgService.getGenesInTaxonByCursor, not in the WebService). - GeneService.populateAssociatedExperimentCount is called on both the legacy Slice and the new CursorPage to keep the response shape identical to the pre-cursor endpoint (each GeneValueObject carries an experiment count).
Author:
phase3
  • Constructor Details

    • TaxaWebServiceGenesCursorTest

      public TaxaWebServiceGenesCursorTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp()
    • offsetModeRoutesToLegacyHelperAndReturnsPaginatedResponse

      @Test public void offsetModeRoutesToLegacyHelperAndReturnsPaginatedResponse()
    • cursorModeRoutesToCursorHelperAndReturnsCursorResponse

      @Test public void cursorModeRoutesToCursorHelperAndReturnsCursorResponse()
    • cursorModeDecodesCursorAndForwardsToArgService

      @Test public void cursorModeDecodesCursorAndForwardsToArgService()
    • cursorModeForwardsResolvedTaxon

      @Test public void cursorModeForwardsResolvedTaxon()