Package org.bremersee.groupman.mock
Class GroupControllerMock
java.lang.Object
org.bremersee.groupman.mock.GroupControllerMock
- All Implemented Interfaces:
GroupControllerApi
The group controller mock.
- Author:
- Christian Bremer
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new group controller mock.GroupControllerMock
(Supplier<String> userNameSupplier) Instantiates a new group controller mock. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Group>
createGroup
(Group group) Create group.org.springframework.http.ResponseEntity<Group>
deleteGroup
(String id) Delete group.Gets editable groups.org.springframework.http.ResponseEntity<Group>
getGroupById
(String id) Gets group by id.getGroupsByIds
(List<String> ids) Gets groups by ids.Gets membership.org.springframework.http.ResponseEntity<GroupIdList>
Gets membership ids.org.springframework.http.ResponseEntity<Status>
Get status of the current user.Gets usable groups.org.springframework.http.ResponseEntity<Group>
updateGroup
(String id, Group group) Update group.
-
Constructor Details
-
GroupControllerMock
public GroupControllerMock()Instantiates a new group controller mock. -
GroupControllerMock
Instantiates a new group controller mock.- Parameters:
userNameSupplier
- the user name supplier
-
-
Method Details
-
createGroup
Description copied from interface:GroupControllerApi
Create group.- Specified by:
createGroup
in interfaceGroupControllerApi
- Parameters:
group
- the group- Returns:
- the response entity
-
deleteGroup
Description copied from interface:GroupControllerApi
Delete group.- Specified by:
deleteGroup
in interfaceGroupControllerApi
- Parameters:
id
- the id- Returns:
- the response entity
-
getEditableGroups
Description copied from interface:GroupControllerApi
Gets editable groups.- Specified by:
getEditableGroups
in interfaceGroupControllerApi
- Returns:
- the editable groups
-
getGroupById
Description copied from interface:GroupControllerApi
Gets group by id.- Specified by:
getGroupById
in interfaceGroupControllerApi
- Parameters:
id
- the id- Returns:
- the group by id
-
getGroupsByIds
Description copied from interface:GroupControllerApi
Gets groups by ids.- Specified by:
getGroupsByIds
in interfaceGroupControllerApi
- Parameters:
ids
- the list of ids- Returns:
- the groups by ids
-
getMembership
Description copied from interface:GroupControllerApi
Gets membership.- Specified by:
getMembership
in interfaceGroupControllerApi
- Returns:
- the membership
-
getMembershipIds
Description copied from interface:GroupControllerApi
Gets membership ids.- Specified by:
getMembershipIds
in interfaceGroupControllerApi
- Returns:
- the membership ids
-
getStatus
Description copied from interface:GroupControllerApi
Get status of the current user.- Specified by:
getStatus
in interfaceGroupControllerApi
- Returns:
- the status
-
getUsableGroups
Description copied from interface:GroupControllerApi
Gets usable groups.- Specified by:
getUsableGroups
in interfaceGroupControllerApi
- Returns:
- the usable groups
-
updateGroup
Description copied from interface:GroupControllerApi
Update group.- Specified by:
updateGroup
in interfaceGroupControllerApi
- Parameters:
id
- the idgroup
- the group- Returns:
- the response entity
-