Class VootServiceLogicTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
edu.internet2.middleware.grouper.testing.GrouperTestBase
edu.internet2.middleware.grouper.helper.GrouperTest
edu.internet2.middleware.grouperVoot.VootTest
edu.internet2.middleware.grouperVoot.VootServiceLogicTest
- All Implemented Interfaces:
junit.framework.Test
Class to test the main service logic for the VOOT connector for Grouper.
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouperVoot.VootTest
GROUP_DESCRIPTIONS, GROUP_NAMES
Fields inherited from class edu.internet2.middleware.grouper.helper.GrouperTest
testing
Fields inherited from class edu.internet2.middleware.grouper.testing.GrouperTestBase
G, NS
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor to initialize VOOT test cases.VootServiceLogicTest
(String name) Constructor with a test name as parameter. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Method to create a registry with all the required users and groups to test all VOOT calls with this test suite.static void
Main method to execute all tests.void
Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group10 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /groups/@me Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /groups/test.subject.0 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /groups/test.subject.1 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /groups/test.subject.2 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group0 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group1 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group3 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/test.subject.0/testVoot:group0 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/test.subject.0/testVoot:group1 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/test.subject.0/testVoot:group10 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/test.subject.0/testVoot:group3 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/test.subject.1/testVoot:group11 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/test.subject.1/testVoot:group1 Note: running this will delete all data in the registry!void
Method that logs in with Subject0 and calls the URL: /people/test.subject.1/testVoot:group3 Note: running this will delete all data in the registry!Methods inherited from class edu.internet2.middleware.grouperVoot.VootTest
callGroupsAPI, callGroupsAPI, callPeopleAPI, callPeopleAPI, validateError, validateGroups, validateMembers
Methods inherited from class edu.internet2.middleware.grouper.helper.GrouperTest
assertEnoughMemory, deleteAllStemsIfExists, errorInitializingTest, initGroupsAndAttributes, isTesting, runCompositeMembershipChangeLogConsumer, setUp, setupConfigs, setupConfigsPostClearCache, setupInitDb, setupTestConfigForIncludeExclude, setupTests, shutdownDelayThreadInterrupt, stemName, tearDown, tomcatRunTests, tomcatStart, tomcatStop
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, getName, run, run, runBare, runTest, setName, toString
-
Constructor Details
-
VootServiceLogicTest
public VootServiceLogicTest()Default constructor to initialize VOOT test cases. -
VootServiceLogicTest
Constructor with a test name as parameter.- Parameters:
name
- the name of this test execution on the test runner.
-
-
Method Details
-
main
Main method to execute all tests.- Parameters:
args
- parameters passed to main (ignored).
-
createRegistryToTestVOOT
protected void createRegistryToTestVOOT()Method to create a registry with all the required users and groups to test all VOOT calls with this test suite. To test all the combinations, the membership and read access to groups will be assigned to two different subjects with the following logic:- Group 0: Subject0 is not member, Subject1 is not member, Subject0 does not have read access, Subject1 does not have read access
- Group 1: Subject0 is admin member, Subject1 is not member, Subject0 has read access, Subject1 does not have read access
- Group 2: Subject0 is not member, Subject1 is admin member, Subject0 does not have read access, Subject1 has read access
- Group 3: Subject0 is member, Subject1 is member, Subject0 has read access, Subject1 has read access
- Group 4: Subject0 is admin member, Subject1 is not member, Subject0 does not have read access, Subject1 does not have read access
- Group 5: Subject0 is not member, Subject1 is admin member, Subject0 does not have read access, Subject1 does not have read access
- Group 6: Subject0 is member, Subject1 is member, Subject0 does not have read access, Subject1 does not have read access
- Group 7: Subject0 is not member, Subject1 is not member, Subject0 has read access, Subject1 does not have read access
- Group 8: Subject0 is not member, Subject1 is not member, Subject0 does not have read access, Subject1 has read access
- Group 9: Subject0 is not member, Subject1 is not member, Subject0 has read access, Subject1 has read access
- Group 10: Subject0 is updater member, Subject1 is not member, Subject0 has read access, Subject1 does not have read access
- Group 11: Subject0 is not member, Subject1 is updater member, Subject0 does not have access, Subject 1 has read access
- Specified by:
createRegistryToTestVOOT
in classVootTest
-
testLoginSubject0GroupMe
public void testLoginSubject0GroupMe()Method that logs in with Subject0 and calls the URL: /groups/@me Note: running this will delete all data in the registry! -
testLoginSubject0GroupSubject0
public void testLoginSubject0GroupSubject0()Method that logs in with Subject0 and calls the URL: /groups/test.subject.0 Note: running this will delete all data in the registry! -
testLoginSubject0GroupSubject1
public void testLoginSubject0GroupSubject1()Method that logs in with Subject0 and calls the URL: /groups/test.subject.1 Note: running this will delete all data in the registry! -
testLoginSubject0GroupSubject2
public void testLoginSubject0GroupSubject2()Method that logs in with Subject0 and calls the URL: /groups/test.subject.2 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleMeGroup1
public void testLoginSubject0PeopleMeGroup1()Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group1 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleMeGroup3
public void testLoginSubject0PeopleMeGroup3()Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group3 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleMeGroup0
public void testLoginSubject0PeopleMeGroup0()Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group0 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleSubject0Group1
public void testLoginSubject0PeopleSubject0Group1()Method that logs in with Subject0 and calls the URL: /people/test.subject.0/testVoot:group1 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleSubject0Group3
public void testLoginSubject0PeopleSubject0Group3()Method that logs in with Subject0 and calls the URL: /people/test.subject.0/testVoot:group3 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleSubject0Group0
public void testLoginSubject0PeopleSubject0Group0()Method that logs in with Subject0 and calls the URL: /people/test.subject.0/testVoot:group0 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleSubject1Group2
public void testLoginSubject0PeopleSubject1Group2()Method that logs in with Subject0 and calls the URL: /people/test.subject.1/testVoot:group1 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleSubject1Group3
public void testLoginSubject0PeopleSubject1Group3()Method that logs in with Subject0 and calls the URL: /people/test.subject.1/testVoot:group3 Note: running this will delete all data in the registry! -
testLoginMePeopleSubject0Group10
public void testLoginMePeopleSubject0Group10()Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group10 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleSubject0Group10
public void testLoginSubject0PeopleSubject0Group10()Method that logs in with Subject0 and calls the URL: /people/test.subject.0/testVoot:group10 Note: running this will delete all data in the registry! -
testLoginSubject0PeopleSubject1Group11
public void testLoginSubject0PeopleSubject1Group11()Method that logs in with Subject0 and calls the URL: /people/test.subject.1/testVoot:group11 Note: running this will delete all data in the registry!
-