public async Task ActivateUsers() { // Arrange var userId = 1; // Act var result = await sut.ActivateUser(userId); // Assert Assert.That(result.Success, Is.True); Assert.That(result.Message, Is.EqualTo("User Activated")); }
public async Task <IActionResult> ActivateUser(int id) { var result = await usersService.ActivateUser(id); if (result.Success) { result.Message = ControllerMessages.StatusCode200(result.Message); return(Ok(result)); } else { result.Message = ControllerMessages.StatusCode404(result.Message); return(NotFound(result)); } }