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:GroupControllerApiCreate group.- Specified by:
createGroupin 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:GroupControllerApiDelete group.- Specified by:
deleteGroupin 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:GroupControllerApiGets editable groups.- Specified by:
getEditableGroupsin interfaceGroupControllerApi- Returns:
- the editable groups
-
getGroupById
public org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Group> getGroupById(String id) Description copied from interface:GroupControllerApiGets group by id.- Specified by:
getGroupByIdin 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:GroupControllerApiGets groups by ids.- Specified by:
getGroupsByIdsin 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:GroupControllerApiGets membership.- Specified by:
getMembershipin interfaceGroupControllerApi- Returns:
- the membership
-
getMembershipIds
public org.springframework.http.ResponseEntity<org.bremersee.groupman.model.GroupIdList> getMembershipIds()Description copied from interface:GroupControllerApiGets membership ids.- Specified by:
getMembershipIdsin interfaceGroupControllerApi- Returns:
- the membership ids
-
getStatus
public org.springframework.http.ResponseEntity<org.bremersee.groupman.model.Status> getStatus()Description copied from interface:GroupControllerApiGet status of the current user.- Specified by:
getStatusin interfaceGroupControllerApi- Returns:
- the status
-
getUsableGroups
public org.springframework.http.ResponseEntity<List<org.bremersee.groupman.model.Group>> getUsableGroups()Description copied from interface:GroupControllerApiGets usable groups.- Specified by:
getUsableGroupsin 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:GroupControllerApiUpdate group.- Specified by:
updateGroupin interfaceGroupControllerApi- Parameters:
id- the idgroup- the group- Returns:
- the response entity
-