Class GshTemplateV2test

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class GshTemplateV2test extends GrouperTestInApi
you can override to make a GSH test. First setup() will be called. Then runLogic() on template
  • Constructor Details

    • GshTemplateV2test

      public GshTemplateV2test()
  • Method Details

    • setGshWsInput

      public void setGshWsInput(Object wsInputBean)
    • getGshWsInput

      public Map<String,Object> getGshWsInput()
    • getGshStemName

      public String getGshStemName()
      where template is called
      Returns:
    • setGshStemName

      public void setGshStemName(String gshStemName)
      where template is called
      Parameters:
      gshStemName -
    • getGshGroupName

      public String getGshGroupName()
      where template is called
      Returns:
    • setGshGroupName

      public void setGshGroupName(String gshGroupName)
      where template is called
      Parameters:
      gshGroupName -
    • getGshTemplateConfigId

      public String getGshTemplateConfigId()
      if the template depends on a certain config id, set it here, otherwise will be set for you
      Returns:
    • setGshTemplateConfigId

      public void setGshTemplateConfigId(String gshTemplateConfigId)
      if the template depends on a certain config id, set it here, otherwise will be set for you
      Parameters:
      gshTemplateConfigId -
    • setGshTemplateOutput

      public void setGshTemplateOutput(GshTemplateOutput gshTemplateOutput)
      used for assertions, teh GSH template framework sets this
      Parameters:
      gshTemplateOutput -
    • getGshTemplateOutput

      public GshTemplateOutput getGshTemplateOutput()
      used for assertions, teh GSH template framework sets this
      Returns:
    • isGshShowOutputLinesOfTest

      public boolean isGshShowOutputLinesOfTest()
      show output of template by default (default true)
      Returns:
    • setGshShowOutputLinesOfTest

      public void setGshShowOutputLinesOfTest(boolean gshShowOutputLinesOfTest1)
      show output of template by default (default true)
      Parameters:
      gshShowOutputLinesOfTest -
    • setUp

      protected void setUp()
      Overrides:
      setUp in class junit.framework.TestCase
    • tearDown

      protected void tearDown()
      Overrides:
      tearDown in class junit.framework.TestCase
    • getName

      public String getName()
      name should be set by test, otherwise it will be generated
      Overrides:
      getName in class junit.framework.TestCase
    • setName

      public void setName(String name)
      name should be set by test, otherwise it will be generated
      Overrides:
      setName in class junit.framework.TestCase
    • addGshInput

      public void addGshInput(String inputName, String valueFromScreen)
    • getGshInputs

      public Map<String,String> getGshInputs()
      return the string values of what it typed on screen. Note: validations will be checked
      Returns:
    • isGshExpectValidationError

      public boolean isGshExpectValidationError()
      true if a validation error is expected based on these inputs. default false
      Returns:
    • setGshExpectValidationError

      public void setGshExpectValidationError(boolean gshExpectValidationError)
      true if a validation error is expected based on these inputs. default false
      Parameters:
      gshExpectValidationError -
    • getGshSubjectUsingApp

      public Subject getGshSubjectUsingApp()
      return the subject using the app in the test (all audits will be as that user). or null will use the user running the test.
      Returns:
      the subject.
    • setGshSubjectUsingApp

      public void setGshSubjectUsingApp(Subject gshSubjectUsingApp1)
      subject using the app in the test (all audits will be as that user). or null will use the user running the test.
      Parameters:
      gshSubjectUsingApp1 -
    • assignGshSubjectUsingApp

      public void assignGshSubjectUsingApp(String source, String subjectIdOrIdentifier)
      subject using the app in the test (all audits will be as that user). or null will use the user running the test.
      Parameters:
      source -
      subjectIdOrIdentifier -
    • gshCheckResult

      public void gshCheckResult()
      put logic here to check state of registry after the template is run
    • assertGshOutputContainsLine

      public void assertGshOutputContainsLine(String messageType, String line)
      see if there is an output matching this line
      Parameters:
      line - to find
      messageType - success (default), info, error
    • assertGshOutputContainsLineNot

      public void assertGshOutputContainsLineNot(String messageType, String line)
      see if there is not an output matching this line
      Parameters:
      line - to find
      messageType - success (default), info, error
    • gshOutputContainsLine

      public boolean gshOutputContainsLine(String messageType, String line)
      see if there is an output matching this line
      Parameters:
      line - to find
      messageType - success (default), info, error
    • assertGshOutputContainsLine

      public void assertGshOutputContainsLine(String line)
      see if there is an output matching this line
      Parameters:
      line - to find
    • assertGshOutputContainsLineNot

      public void assertGshOutputContainsLineNot(String line)
      see if there is not an output matching this line
      Parameters:
      line - to find
    • assertGshOutputLineContainsText

      public void assertGshOutputLineContainsText(String messageType, String substring)
      see if there is an output matching this line
      Parameters:
      substring - to find
    • assertGshOutputLineContainsTextNot

      public void assertGshOutputLineContainsTextNot(String messageType, String substring)
      see if there is not an output matching this line
      Parameters:
      substring - to find
    • gshOutputLineContainsText

      public boolean gshOutputLineContainsText(String messageType, String substring)
      see if there is an output matching this line
      Parameters:
      substring - to find
    • assertGshOutputLineContainsTextNot

      public void assertGshOutputLineContainsTextNot(String substring)
      see if there is not an output matching this line
      Parameters:
      substring - to find
    • assertGshOutputLineContainsText

      public void assertGshOutputLineContainsText(String substring)
      see if there is an output matching this line
      Parameters:
      substring - to find
    • assertGshValidationContainsLine

      public void assertGshValidationContainsLine(String inputName, String line)
      see if there is an validation matching this line
      Parameters:
      line - to find
      inputName -
    • assertGshValidationContainsLineNot

      public void assertGshValidationContainsLineNot(String inputName, String line)
      see if there is not an validation matching this line
      Parameters:
      line - to find
      inputName -
    • gshValidationContainsLine

      public boolean gshValidationContainsLine(String inputName, String line)
      see if there is an validation matching this line
      Parameters:
      line - to find
      inputName -
    • assertGshValidationLineContainsText

      public void assertGshValidationLineContainsText(String inputName, String substring)
      see if there is an validation matching this line
      Parameters:
      substring - to find
      inputName -
    • assertGshValidationLineContainsTextNot

      public void assertGshValidationLineContainsTextNot(String inputName, String substring)
      see if there is not a validation matching this line
      Parameters:
      substring - to find
      inputName -
    • gshValidationLineContainsText

      public boolean gshValidationLineContainsText(String inputName, String substring)
      see if there is an validation matching this line
      Parameters:
      substring - to find
      inputName -