Class VootParamsLogicTest

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
edu.internet2.middleware.grouper.testing.GrouperTestBase
All Implemented Interfaces:
junit.framework.Test

public class VootParamsLogicTest extends VootTest
Class to test the parameter passing to 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

    Constructors
    Constructor
    Description
    Default constructor to initialize VOOT test cases.
    Constructor with a test name as parameter.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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(String[] args)
    Main method to execute all tests.
    protected void
     
    void
    Method that logs in with Subject0 and calls the URL: /groups/@me?startIndex=0&count=5 Note: running this will delete all data in the registry!
    void
    Method that logs in with Subject0 and calls the URL: /groups/@me?startIndex=10&count=5 Note: running this will delete all data in the registry!
    void
    Method that logs in with Subject0 and calls the URL: /groups/@me?startIndex=5&count=5 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?startIndex=0&count=4 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?startIndex=8&count=4 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?startIndex=4&count=4 Note: running this will delete all data in the registry!
    void
    Method that logs in with Subject0 and calls the URL: /groups?search= Note: running this will delete all data in the registry!
    void
    Method that logs in with Subject0 and calls the URL: /groups?search=unexistent:group Note: running this will delete all data in the registry!
    void
    Method that logs in with Subject0 and calls the URL: /groups?search=testVoot:group1 Note: running this will delete all data in the registry!
    void
    Method that logs in with Subject0 and calls the URL: /groups/@me?orderBy=description Note: running this will delete all data in the registry!
    void
    Method that logs in with Subject0 and calls the URL: /groups/@me?orderBy=id Note: running this will delete all data in the registry!
    void
    Method that logs in with Subject0 and calls the URL: /groups/@me?orderBy=name Note: running this will delete all data in the registry!
    void
    Method that logs in with Subject1 and calls the URL: /groups/@me?orderBy=voot_membershib_role 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?orderBy=displayName 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?orderBy=id 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?orderBy=voot_membership_role 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.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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • VootParamsLogicTest

      public VootParamsLogicTest()
      Default constructor to initialize VOOT test cases.
    • VootParamsLogicTest

      public VootParamsLogicTest(String name)
      Constructor with a test name as parameter.
      Parameters:
      name - the name of this test execution on the test runner.
  • Method Details

    • main

      public static void main(String[] args)
      Main method to execute all tests.
      Parameters:
      args - parameters passed to main (ignored).
    • setupConfigs

      protected void setupConfigs()
      Overrides:
      setupConfigs in class GrouperTest
    • 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. These tests have to prove pagination and sorting, so a significant number of groups were required. We create then 12 groups where:
      • Group 0: is a group containing 10 subjects (to test pagination on group members)
      • Group 1 to Group 11: are groups where Subject0 is member
      Specified by:
      createRegistryToTestVOOT in class VootTest
    • testPaginateGroupsFirstPage

      public void testPaginateGroupsFirstPage()
      Method that logs in with Subject0 and calls the URL: /groups/@me?startIndex=0&count=5 Note: running this will delete all data in the registry!
    • testPaginateGroupsSecondPage

      public void testPaginateGroupsSecondPage()
      Method that logs in with Subject0 and calls the URL: /groups/@me?startIndex=5&count=5 Note: running this will delete all data in the registry!
    • testPaginateGroupsLastPage

      public void testPaginateGroupsLastPage()
      Method that logs in with Subject0 and calls the URL: /groups/@me?startIndex=10&count=5 Note: running this will delete all data in the registry!
    • testPaginatePeopleFirstPage

      public void testPaginatePeopleFirstPage()
      Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group0?startIndex=0&count=4 Note: running this will delete all data in the registry!
    • testPaginatePeopleSecondPage

      public void testPaginatePeopleSecondPage()
      Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group0?startIndex=4&count=4 Note: running this will delete all data in the registry!
    • testPaginatePeopleLastPage

      public void testPaginatePeopleLastPage()
      Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group0?startIndex=8&count=4 Note: running this will delete all data in the registry!
    • testSortGroupsById

      public void testSortGroupsById()
      Method that logs in with Subject0 and calls the URL: /groups/@me?orderBy=id Note: running this will delete all data in the registry!
    • testSortGroupsByName

      public void testSortGroupsByName()
      Method that logs in with Subject0 and calls the URL: /groups/@me?orderBy=name Note: running this will delete all data in the registry!
    • testSortGroupsByDescription

      public void testSortGroupsByDescription()
      Method that logs in with Subject0 and calls the URL: /groups/@me?orderBy=description Note: running this will delete all data in the registry!
    • testSortGroupsByVootMembershipRole

      public void testSortGroupsByVootMembershipRole()
      Method that logs in with Subject1 and calls the URL: /groups/@me?orderBy=voot_membershib_role Note: running this will delete all data in the registry!
    • testSortPeopleById

      public void testSortPeopleById()
      Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group0?orderBy=id Note: running this will delete all data in the registry!
    • testSortPeopleByDisplayName

      public void testSortPeopleByDisplayName()
      Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group0?orderBy=displayName Note: running this will delete all data in the registry!
    • testSortPeopleByVootMembershipRole

      public void testSortPeopleByVootMembershipRole()
      Method that logs in with Subject0 and calls the URL: /people/@me/testVoot:group0?orderBy=voot_membership_role Note: running this will delete all data in the registry!
    • testSearchGroupsWithResults

      public void testSearchGroupsWithResults()
      Method that logs in with Subject0 and calls the URL: /groups?search=testVoot:group1 Note: running this will delete all data in the registry!
    • testSearchGroupsWithOutResults

      public void testSearchGroupsWithOutResults()
      Method that logs in with Subject0 and calls the URL: /groups?search=unexistent:group Note: running this will delete all data in the registry!
    • testSearchAllGroups

      public void testSearchAllGroups()
      Method that logs in with Subject0 and calls the URL: /groups?search= Note: running this will delete all data in the registry!