Class GshTemplateV2test
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
edu.internet2.middleware.grouper.testing.GrouperTestBase
edu.internet2.middleware.grouper.testing.GrouperTestInApi
edu.internet2.middleware.grouper.app.gsh.template.GshTemplateV2test
- All Implemented Interfaces:
junit.framework.Test
you can override to make a GSH test. First setup() will be called. Then runLogic() on template
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouper.testing.GrouperTestBase
G, NS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addGshInput
(String inputName, String valueFromScreen) void
see if there is an output matching this linevoid
assertGshOutputContainsLine
(String messageType, String line) see if there is an output matching this linevoid
see if there is not an output matching this linevoid
assertGshOutputContainsLineNot
(String messageType, String line) see if there is not an output matching this linevoid
assertGshOutputLineContainsText
(String substring) see if there is an output matching this linevoid
assertGshOutputLineContainsText
(String messageType, String substring) see if there is an output matching this linevoid
assertGshOutputLineContainsTextNot
(String substring) see if there is not an output matching this linevoid
assertGshOutputLineContainsTextNot
(String messageType, String substring) see if there is not an output matching this linevoid
assertGshValidationContainsLine
(String inputName, String line) see if there is an validation matching this linevoid
assertGshValidationContainsLineNot
(String inputName, String line) see if there is not an validation matching this linevoid
assertGshValidationLineContainsText
(String inputName, String substring) see if there is an validation matching this linevoid
assertGshValidationLineContainsTextNot
(String inputName, String substring) see if there is not a validation matching this linevoid
assignGshSubjectUsingApp
(String source, String subjectIdOrIdentifier) subject using the app in the test (all audits will be as that user).where template is calledreturn the string values of what it typed on screen.where template is calledreturn the subject using the app in the test (all audits will be as that user).if the template depends on a certain config id, set it here, otherwise will be set for youused for assertions, teh GSH template framework sets thisgetName()
name should be set by test, otherwise it will be generatedvoid
put logic here to check state of registry after the template is runboolean
gshOutputContainsLine
(String messageType, String line) see if there is an output matching this lineboolean
gshOutputLineContainsText
(String messageType, String substring) see if there is an output matching this lineboolean
gshValidationContainsLine
(String inputName, String line) see if there is an validation matching this lineboolean
gshValidationLineContainsText
(String inputName, String substring) see if there is an validation matching this lineboolean
true if a validation error is expected based on these inputs.boolean
show output of template by default (default true)void
setGshExpectValidationError
(boolean gshExpectValidationError) true if a validation error is expected based on these inputs.void
setGshGroupName
(String gshGroupName) where template is calledvoid
setGshShowOutputLinesOfTest
(boolean gshShowOutputLinesOfTest1) show output of template by default (default true)void
setGshStemName
(String gshStemName) where template is calledvoid
setGshSubjectUsingApp
(Subject gshSubjectUsingApp1) subject using the app in the test (all audits will be as that user).void
setGshTemplateConfigId
(String gshTemplateConfigId) if the template depends on a certain config id, set it here, otherwise will be set for youvoid
setGshTemplateOutput
(GshTemplateOutput gshTemplateOutput) used for assertions, teh GSH template framework sets thisvoid
setGshWsInput
(Object wsInputBean) void
name should be set by test, otherwise it will be generatedprotected void
setUp()
protected void
tearDown()
Methods inherited from class edu.internet2.middleware.grouper.testing.GrouperTestBase
assertContains, assertContains, assertContainsAttributeDef, assertContainsAttributeDefName, assertContainsGroup, assertContainsGroups, assertContainsStem, assertContainsStems, assertContainsString, assertContainsString, assertDoNotFindGroupByAttribute, assertDoNotFindGroupByName, assertDoNotFindGroupByName, assertDoNotFindGroupByType, assertDoNotFindGroupByType, assertDoNotFindStemByName, assertDoNotFindStemByName, assertEquals, assertEquals, assertEqualsMultiKey, assertEqualsMultiKey, assertEqualsObjectArrays, assertEqualsObjectArrays, assertFindField, assertFindGroupByAttribute, assertFindGroupByName, assertFindGroupByName, assertFindGroupByType, assertFindGroupByType, assertFindGroupType, assertFindStemByName, assertFindStemByName, assertGroupAttribute, assertGroupCreateSubject, assertGroupCreateTime, assertGroupDescription, assertGroupDisplayExtension, assertGroupDisplayName, assertGroupExtension, assertGroupHasAdmin, assertGroupHasGroupAttrRead, assertGroupHasGroupAttrUpdate, assertGroupHasMember, assertGroupHasMember, assertGroupHasOptin, assertGroupHasOptout, assertGroupHasRead, assertGroupHasType, assertGroupHasUpdate, assertGroupHasView, assertGroupName, assertGroupSetsAndOrder, assertGroupUuid, assertHasPrivilege, assertHasPrivilege, assertHasPrivilege, assertNotContainsAttributeDef, assertNotContainsAttributeDefName, assertNotContainsGroup, assertNotContainsStem, assertStemCreateSubject, assertStemCreateTime, assertStemDescription, assertStemDisplayExtension, assertStemDisplayName, assertStemExtension, assertStemHasCreate, assertStemHasStem, assertStemName, assertStemUuid, deleteGroupIfExists, deleteStemIfExists, filterOutBuiltInGroups, groupsString, printMemberships, stemsString, unexpectedException
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, run, run, runBare, runTest, toString
-
Constructor Details
-
GshTemplateV2test
public GshTemplateV2test()
-
-
Method Details
-
setGshWsInput
-
getGshWsInput
-
getGshStemName
where template is called- Returns:
-
setGshStemName
where template is called- Parameters:
gshStemName
-
-
getGshGroupName
where template is called- Returns:
-
setGshGroupName
where template is called- Parameters:
gshGroupName
-
-
getGshTemplateConfigId
if the template depends on a certain config id, set it here, otherwise will be set for you- Returns:
-
setGshTemplateConfigId
if the template depends on a certain config id, set it here, otherwise will be set for you- Parameters:
gshTemplateConfigId
-
-
setGshTemplateOutput
used for assertions, teh GSH template framework sets this- Parameters:
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 classjunit.framework.TestCase
-
tearDown
protected void tearDown()- Overrides:
tearDown
in classjunit.framework.TestCase
-
getName
name should be set by test, otherwise it will be generated- Overrides:
getName
in classjunit.framework.TestCase
-
setName
name should be set by test, otherwise it will be generated- Overrides:
setName
in classjunit.framework.TestCase
-
addGshInput
-
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
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
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
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
see if there is an output matching this line- Parameters:
line
- to findmessageType
- success (default), info, error
-
assertGshOutputContainsLineNot
see if there is not an output matching this line- Parameters:
line
- to findmessageType
- success (default), info, error
-
gshOutputContainsLine
see if there is an output matching this line- Parameters:
line
- to findmessageType
- success (default), info, error
-
assertGshOutputContainsLine
see if there is an output matching this line- Parameters:
line
- to find
-
assertGshOutputContainsLineNot
see if there is not an output matching this line- Parameters:
line
- to find
-
assertGshOutputLineContainsText
see if there is an output matching this line- Parameters:
substring
- to find
-
assertGshOutputLineContainsTextNot
see if there is not an output matching this line- Parameters:
substring
- to find
-
gshOutputLineContainsText
see if there is an output matching this line- Parameters:
substring
- to find
-
assertGshOutputLineContainsTextNot
see if there is not an output matching this line- Parameters:
substring
- to find
-
assertGshOutputLineContainsText
see if there is an output matching this line- Parameters:
substring
- to find
-
assertGshValidationContainsLine
see if there is an validation matching this line- Parameters:
line
- to findinputName
-
-
assertGshValidationContainsLineNot
see if there is not an validation matching this line- Parameters:
line
- to findinputName
-
-
gshValidationContainsLine
see if there is an validation matching this line- Parameters:
line
- to findinputName
-
-
assertGshValidationLineContainsText
see if there is an validation matching this line- Parameters:
substring
- to findinputName
-
-
assertGshValidationLineContainsTextNot
see if there is not a validation matching this line- Parameters:
substring
- to findinputName
-
-
gshValidationLineContainsText
see if there is an validation matching this line- Parameters:
substring
- to findinputName
-
-