Closed fabian001254 closed 6 months ago
Test cases have been created for the follow functionality in the UserServiceImpl
service. These test cases focus on ensuring that the follow
method behaves correctly in a variety of scenarios.
follow
method executes successfully when valid user IDs and roles are provided. It ensures that the customer user can follow the seller user correctly.follow
method throws a NotFoundException
if the user being followed does not exist in the repository. This ensures proper handling of cases where the user to be followed is not available.follow
method throws a BadRequestException
if both the customer and seller users have the same role. This ensures that users can only follow users with different roles.follow
method throws a BadRequestException
if the user being followed is already in the customer user's followed list. This prevents a user from following the same user multiple times.
Medio dia