Class GroupControllerMock

java.lang.Object
org.bremersee.groupman.mock.GroupControllerMock
All Implemented Interfaces:
GroupControllerApi

public class GroupControllerMock extends Object implements GroupControllerApi
The group controller mock.
Author:
Christian Bremer
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new group controller mock.
    GroupControllerMock(Supplier<String> userNameSupplier)
    Instantiates a new group controller mock.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group>
    createGroup(org.bremersee.groupman.model.Group group)
    Create group.
    org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group>
    Delete group.
    org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>>
    Gets editable groups.
    org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group>
    Gets group by id.
    org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>>
    Gets groups by ids.
    org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>>
    Gets membership.
    org.springframework.http.ResponseEntity<org.bremersee.groupman.model.GroupIdList>
    Gets membership ids.
    org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Status>
    Get status of the current user.
    org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>>
    Gets usable groups.
    org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group>
    updateGroup(String id, org.bremersee.groupman.model.Group group)
    Update group.

    Methods inherited from class java.lang.Object

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

    • GroupControllerMock

      public GroupControllerMock()
      Instantiates a new group controller mock.
    • GroupControllerMock

      public GroupControllerMock(Supplier<String> userNameSupplier)
      Instantiates a new group controller mock.
      Parameters:
      userNameSupplier - the user name supplier
  • Method Details

    • createGroup

      public org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group> createGroup(org.bremersee.groupman.model.Group group)
      Description copied from interface: GroupControllerApi
      Create group.
      Specified by:
      createGroup in interface GroupControllerApi
      Parameters:
      group - the group
      Returns:
      the response entity
    • deleteGroup

      public org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group> deleteGroup(String id)
      Description copied from interface: GroupControllerApi
      Delete group.
      Specified by:
      deleteGroup in interface GroupControllerApi
      Parameters:
      id - the id
      Returns:
      the response entity
    • getEditableGroups

      public org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>> getEditableGroups()
      Description copied from interface: GroupControllerApi
      Gets editable groups.
      Specified by:
      getEditableGroups in interface GroupControllerApi
      Returns:
      the editable groups
    • getGroupById

      public org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group> getGroupById(String id)
      Description copied from interface: GroupControllerApi
      Gets group by id.
      Specified by:
      getGroupById in interface GroupControllerApi
      Parameters:
      id - the id
      Returns:
      the group by id
    • getGroupsByIds

      public org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>> getGroupsByIds(List<String> ids)
      Description copied from interface: GroupControllerApi
      Gets groups by ids.
      Specified by:
      getGroupsByIds in interface GroupControllerApi
      Parameters:
      ids - the list of ids
      Returns:
      the groups by ids
    • getMembership

      public org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>> getMembership()
      Description copied from interface: GroupControllerApi
      Gets membership.
      Specified by:
      getMembership in interface GroupControllerApi
      Returns:
      the membership
    • getMembershipIds

      public org.springframework.http.ResponseEntity<org.bremersee.groupman.model.GroupIdList> getMembershipIds()
      Description copied from interface: GroupControllerApi
      Gets membership ids.
      Specified by:
      getMembershipIds in interface GroupControllerApi
      Returns:
      the membership ids
    • getStatus

      public org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Status> getStatus()
      Description copied from interface: GroupControllerApi
      Get status of the current user.
      Specified by:
      getStatus in interface GroupControllerApi
      Returns:
      the status
    • getUsableGroups

      public org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>> getUsableGroups()
      Description copied from interface: GroupControllerApi
      Gets usable groups.
      Specified by:
      getUsableGroups in interface GroupControllerApi
      Returns:
      the usable groups
    • updateGroup

      public org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group> updateGroup(String id, org.bremersee.groupman.model.Group group)
      Description copied from interface: GroupControllerApi
      Update group.
      Specified by:
      updateGroup in interface GroupControllerApi
      Parameters:
      id - the id
      group - the group
      Returns:
      the response entity