Class ArrayDesignSequenceManipulatingCliTest


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

    • ArrayDesignSequenceManipulatingCliTest

      public ArrayDesignSequenceManipulatingCliTest()
  • Method Details

    • resetMocks

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

      @Test @WithMockUser public void testExplicitADsOnlyAllOptionNeverLoadsEveryPlatform()
      -all is not a registered option here, so Commons CLI's short-option matching absorbs it as -a ll (this CLI's own -a takes an argument) rather than rejecting it outright — but either way it must never reach BaseReadOnlyService.loadAll(): "ll" isn't a real platform, so location fails exactly as it would for any other typo, matching EntityLocatorImpl.locateArrayDesign(String)'s real behavior.
    • testExplicitADsOnlyRequiresAOrF

      @Test @WithMockUser public void testExplicitADsOnlyRequiresAOrF()
    • testExplicitADsOnlySucceedsWithA

      @Test @WithMockUser public void testExplicitADsOnlySucceedsWithA()
    • testOrdinaryCliStillAcceptsAllOption

      @Test @WithMockUser public void testOrdinaryCliStillAcceptsAllOption()
      Regression check: a CLI on this base class that does NOT opt into ArrayDesignSequenceManipulatingCli.setExplicitADsOnly() keeps -all, since that's shared by CLIs that legitimately process every platform (e.g. report regeneration).