Class ExpressionExperimentManipulatingCLITest

java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.cli.util.test.BaseCliTest5
ubic.gemma.apps.ExpressionExperimentManipulatingCLITest

@ContextConfiguration @TestExecutionListeners(value=org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener.class, mergeMode=MERGE_WITH_DEFAULTS) public class ExpressionExperimentManipulatingCLITest extends BaseCliTest5
  • Constructor Details

    • ExpressionExperimentManipulatingCLITest

      public ExpressionExperimentManipulatingCLITest()
  • Method Details

    • resetMocks

      @BeforeEach public void resetMocks()
      eeService and arrayDesignService are shared, manually-created mocks (not @MockBean), so nothing resets their recorded interactions between test methods; without this, one test's real loadAll() call could leak into another test's verify(..., never()).
    • testSingleExperimentMode

      @Test @WithMockUser public void testSingleExperimentMode()
    • testSingleExperimentModeLeavesSubclassFileOptionAlone

      @Test @WithMockUser public void testSingleExperimentModeLeavesSubclassFileOptionAlone(@TempDir Path tempDir) throws IOException
      In single-experiment mode the base class defines no -f, so a subclass's -f is the subclass's. It used to be read as a list of datasets as well: importDesign looked up its design file's header line as a dataset and failed.
      Throws:
      IOException
    • testGetExperimentDataFileResult

      @Test public void testGetExperimentDataFileResult()
    • testATroubledDatasetDroppedFromABatchIsReportedAsAWarning

      @Test @WithMockUser public void testATroubledDatasetDroppedFromABatchIsReportedAsAWarning()
      A troubled dataset dropped from a multi-dataset run is listed in the batch summary. This CLI has no -force option, so the summary must not tell the user to pass it.
    • testATroubledDatasetDroppedFromABatchPointsAtForceWhenTheCliAcceptsIt

      @Test @WithMockUser public void testATroubledDatasetDroppedFromABatchPointsAtForceWhenTheCliAcceptsIt()
    • testDeleteExperimentsWithOnlyAPlatformOption

      @Test @WithMockUser public void testDeleteExperimentsWithOnlyAPlatformOption()
      deleteExperiments -a selects platforms, not datasets, so it must not be rejected for lacking a dataset option.
    • testDeleteExperimentsWithNoSelectionStillFails

      @Test @WithMockUser public void testDeleteExperimentsWithNoSelectionStillFails()
    • testDeleteExperimentsAllNeverLoadsEveryExperiment

      @Test @WithMockUser public void testDeleteExperimentsAllNeverLoadsEveryExperiment()
      deleteExperiments deletes data with no undo. Its own -a (delete platforms instead) takes an argument, so a removed -all option is absorbed as -a ll rather than rejected outright — but either way it must never reach BaseReadOnlyService.loadAll().
    • testExplicitEEsOnlyRefusesEveryBulkOption

      @Test @WithMockUser public void testExplicitEEsOnlyRefusesEveryBulkOption()
      -all, -f and -q must not exist as options for a destructive CLI: only -e is recognized. (-eeset is not checked the same way: since -e takes an argument, Commons CLI's short-option matching absorbs an unrecognized -eeset as -e eset, which is still safe — it addresses one (nonexistent) experiment named "eset", never every experiment in a set.)
    • testExplicitEEsOnlyRequiresE

      @Test @WithMockUser public void testExplicitEEsOnlyRequiresE()
    • testExplicitEEsOnlySucceedsWithE

      @Test @WithMockUser public void testExplicitEEsOnlySucceedsWithE()