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<org.bremersee.groupman.model.Group>
createGroup
(org.bremersee.groupman.model.Group group) Create group.org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group>
deleteGroup
(String id) Delete group.org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>>
Gets editable groups.org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group>
getGroupById
(String id) Gets group by id.org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>>
getGroupsByIds
(List<String> ids) 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.
-
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
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 interfaceGroupControllerApi
- 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 interfaceGroupControllerApi
- 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 interfaceGroupControllerApi
- 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 interfaceGroupControllerApi
- 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 interfaceGroupControllerApi
- 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 interfaceGroupControllerApi
- 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 interfaceGroupControllerApi
- 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 interfaceGroupControllerApi
- 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 interfaceGroupControllerApi
- 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 interfaceGroupControllerApi
- Parameters:
id
- the idgroup
- the group- Returns:
- the response entity
-