Class GitHubActionsKitTest

java.lang.Object
me.julb.sdk.github.actions.kit.GitHubActionsKitTest

@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) class GitHubActionsKitTest extends Object
Test class for GitHubActionsKit class.
Author:
Julb.
  • Constructor Details

    • GitHubActionsKitTest

      GitHubActionsKitTest()
  • Method Details

    • setUp

      @BeforeEach void setUp()
      Called before each test.
    • whenInstanceRequired_thenReturnInstance

      @Test void whenInstanceRequired_thenReturnInstance() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetInputPresent_thenReturnValue

      @Test void whenGetInputPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetInputAbsentNull_thenReturnEmpty

      @Test void whenGetInputAbsentNull_thenReturnEmpty() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetInputAbsentNullEmptyBlankString_thenReturnEmpty

      @ParameterizedTest @NullAndEmptySource @ValueSource(strings=" ") void whenGetInputAbsentNullEmptyBlankString_thenReturnEmpty(String absentEnvValue) throws Exception
      Test method.
      Throws:
      Exception
    • whenGetInputNull_thenThrowNullPointerException

      @Test void whenGetInputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetInputTrimTruePresent_thenReturnValueTrimmed

      @Test void whenGetInputTrimTruePresent_thenReturnValueTrimmed() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetInputTrimFalsePresent_thenReturnValueNotTrimmed

      @Test void whenGetInputTrimFalsePresent_thenReturnValueNotTrimmed() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetInputTrimNull_thenThrowNullPointerException

      @Test void whenGetInputTrimNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredInputPresent_thenReturnValue

      @Test void whenGetRequiredInputPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredInputAbsent_thenThrowNoSuchElementException

      @Test void whenGetRequiredInputAbsent_thenThrowNoSuchElementException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredInputNull_thenThrowNullPointerException

      @Test void whenGetRequiredInputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredInputTrimTruePresent_thenReturnValueTrimmed

      @Test void whenGetRequiredInputTrimTruePresent_thenReturnValueTrimmed() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredInputTrimFalsePresent_thenReturnValueNotTrimmed

      @Test void whenGetRequiredInputTrimFalsePresent_thenReturnValueNotTrimmed() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredInputTrimAbsent_thenThrowNoSuchElementException

      @Test void whenGetRequiredInputTrimAbsent_thenThrowNoSuchElementException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredInputTrimNull_thenThrowNullPointerException

      @Test void whenGetRequiredInputTrimNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetBooleanInputPresent_thenReturnValue

      @Test void whenGetBooleanInputPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetBooleanInputAbsent_thenReturnEmpty

      @Test void whenGetBooleanInputAbsent_thenReturnEmpty() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetBooleanInputInvalid_thenThrowIllegalArgumentException

      @Test void whenGetBooleanInputInvalid_thenThrowIllegalArgumentException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetBooleanInputNull_thenThrowNullPointerException

      @Test void whenGetBooleanInputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredBooleanInputPresent_thenReturnValue

      @Test void whenGetRequiredBooleanInputPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredBooleanInputAbsent_thenThrowNoSuchElementException

      @Test void whenGetRequiredBooleanInputAbsent_thenThrowNoSuchElementException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredBooleanInputInvalid_thenThrowIllegalArgumentException

      @Test void whenGetRequiredBooleanInputInvalid_thenThrowIllegalArgumentException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredBooleanInputNull_thenThrowNullPointerException

      @Test void whenGetRequiredBooleanInputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetEnumInputPresent_thenReturnValue

      @Test void whenGetEnumInputPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetEnumInputAbsent_thenReturnEmpty

      @Test void whenGetEnumInputAbsent_thenReturnEmpty() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetEnumInputInvalid_thenThrowIllegalArgumentException

      @Test void whenGetEnumInputInvalid_thenThrowIllegalArgumentException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetEnumInputNull_thenThrowNullPointerException

      @Test void whenGetEnumInputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredEnumInputPresent_thenReturnValue

      @Test void whenGetRequiredEnumInputPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredEnumInputAbsent_thenThrowNoSuchElementException

      @Test void whenGetRequiredEnumInputAbsent_thenThrowNoSuchElementException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredEnumInputInvalid_thenThrowIllegalArgumentException

      @Test void whenGetRequiredEnumInputInvalid_thenThrowIllegalArgumentException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredEnumInputNull_thenThrowNullPointerException

      @Test void whenGetRequiredEnumInputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetMultilineInputPresent_thenReturnValue

      @Test void whenGetMultilineInputPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetMultilineInputAbsent_thenReturnEmpty

      @Test void whenGetMultilineInputAbsent_thenReturnEmpty() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetMultilineInputNull_thenThrowNullPointerException

      @Test void whenGetMultilineInputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetMultilineInputTrimTruePresent_thenReturnValueTrimmed

      @Test void whenGetMultilineInputTrimTruePresent_thenReturnValueTrimmed() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetMultilineInputTrimFalsePresent_thenReturnValueNotTrimmed

      @Test void whenGetMultilineInputTrimFalsePresent_thenReturnValueNotTrimmed() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetMultilineInputTrimAbsent_thenReturnEmpty

      @Test void whenGetMultilineInputTrimAbsent_thenReturnEmpty() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetMultilineInputTrimNull_thenThrowNullPointerException

      @Test void whenGetMultilineInputTrimNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredMultilineInputPresent_thenReturnValue

      @Test void whenGetRequiredMultilineInputPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredMultilineInputAbsent_thenThrowNoSuchElementException

      @Test void whenGetRequiredMultilineInputAbsent_thenThrowNoSuchElementException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredMultilineInputNull_thenThrowNullPointerException

      @Test void whenGetRequiredMultilineInputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredMultilineInputTrimTruePresent_thenReturnValueTrimmed

      @Test void whenGetRequiredMultilineInputTrimTruePresent_thenReturnValueTrimmed() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredMultilineInputTrimFalsePresent_thenReturnValueNotTrimmed

      @Test void whenGetRequiredMultilineInputTrimFalsePresent_thenReturnValueNotTrimmed() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredMultilineTrimInputAbsent_thenThrowNoSuchElementException

      @Test void whenGetRequiredMultilineTrimInputAbsent_thenThrowNoSuchElementException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredMultilineTrimInputNull_thenThrowNullPointerException

      @Test void whenGetRequiredMultilineTrimInputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetOutput_thenPrintCommand

      @Test void whenSetOutput_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetOutputNull_thenThrowNullPointerException

      @Test void whenSetOutputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetEmptyOutput_thenPrintCommand

      @Test void whenSetEmptyOutput_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetEmptyOutputNull_thenThrowNullPointerException

      @Test void whenSetEmptyOutputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetOptionalOutputPresent_thenPrintCommand

      @Test void whenSetOptionalOutputPresent_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetOptionalOutputEmpty_thenPrintCommand

      @Test void whenSetOptionalOutputEmpty_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetOptionalOutputNull_thenThrowNullPointerException

      @Test void whenSetOptionalOutputNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetCommandEchoEnabled_thenPrintCommand

      @Test void whenSetCommandEchoEnabled_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenStartGroup_thenPrintCommand

      @Test void whenStartGroup_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenStartGroupNull_thenThrowNullPointerException

      @Test void whenStartGroupNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenRunInGroup_thenPrintCommand

      @Test void whenRunInGroup_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenRunInGroupNull_thenThrowNullPointerException

      @Test void whenRunInGroupNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenCallInGroup_thenPrintCommand

      @Test void whenCallInGroup_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenCallInGroupNull_thenThrowNullPointerException

      @Test void whenCallInGroupNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenEndGroup_thenPrintCommand

      @Test void whenEndGroup_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenSaveState_thenPrintCommand

      @Test void whenSaveState_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenSaveStateNull_thenThrowNullPointerException

      @Test void whenSaveStateNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetStatePresent_thenReturnValue

      @Test void whenGetStatePresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetStateNull_thenThrowNullPointerException

      @Test void whenGetStateNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetStateAbsent_thenReturnEmpty

      @Test void whenGetStateAbsent_thenReturnEmpty() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetSecret_thenPrintCommand

      @Test void whenSetSecret_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenSetSecretNull_thenThrowNullPointerException

      @Test void whenSetSecretNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenIsDebug_thenReturnValue

      @Test void whenIsDebug_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenFail_thenExitWithErrorCode

      @Test void whenFail_thenExitWithErrorCode() throws Exception
      Test method.
      Throws:
      Exception
    • whenFailNull_thenThrowNullPointerException

      @Test void whenFailNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenDebug_thenPrintCommand

      @Test void whenDebug_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenDebugNull_thenThrowNullPointerException

      @Test void whenDebugNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenNotice_thenPrintCommand

      @Test void whenNotice_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenNoticeNull_thenThrowNullPointerException

      @Test void whenNoticeNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenNoticeProperties_thenPrintCommand

      @Test void whenNoticeProperties_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenNoticePropertiesNull_thenThrowNullPointerException

      @Test void whenNoticePropertiesNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenWarning_thenPrintCommand

      @Test void whenWarning_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenWarningNull_thenThrowNullPointerException

      @Test void whenWarningNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenWarningProperties_thenPrintCommand

      @Test void whenWarningProperties_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenWarningPropertiesNull_thenThrowNullPointerException

      @Test void whenWarningPropertiesNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenError_thenPrintCommand

      @Test void whenError_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenErrorNull_thenThrowNullPointerException

      @Test void whenErrorNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenErrorProperties_thenPrintCommand

      @Test void whenErrorProperties_thenPrintCommand() throws Exception
      Test method.
      Throws:
      Exception
    • whenErrorPropertiesNull_thenThrowNullPointerException

      @Test void whenErrorPropertiesNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetGitHubEnvVarsBranch_thenReturnValue

      @Test void whenGetGitHubEnvVarsBranch_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetGitHubEnvVarsTag_thenReturnValue

      @Test void whenGetGitHubEnvVarsTag_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetGitHubEnvVars_thenThrowNoSuchElementException

      @Test void whenGetGitHubEnvVars_thenThrowNoSuchElementException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetEnvPresent_thenReturnValue

      @Test void whenGetEnvPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetEnvAbsent_thenReturnEmpty

      @Test void whenGetEnvAbsent_thenReturnEmpty() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetEnvNull_thenThrowNullPointerException

      @Test void whenGetEnvNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredEnvPresent_thenReturnValue

      @Test void whenGetRequiredEnvPresent_thenReturnValue() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredEnvAbsent_thenThrowNoSuchElementException

      @Test void whenGetRequiredEnvAbsent_thenThrowNoSuchElementException() throws Exception
      Test method.
      Throws:
      Exception
    • whenGetRequiredEnvNull_thenThrowNullPointerException

      @Test void whenGetRequiredEnvNull_thenThrowNullPointerException() throws Exception
      Test method.
      Throws:
      Exception