public async Task<ActionResult> ActivateUser(string code) { try { await _activationLogic.ActivateUser(code); return Ok(); } catch (KeyNotFoundException) { return NotFound(); } catch (Exception e) { _logLogic.Log(e); return StatusCode(StatusCodes.Status500InternalServerError); } }
public void ActivationUserTest() { var userActivationRabbitMq = new TestUserActivationRabbitMq().UserActivation; Assert.DoesNotThrowAsync(() => _activationLogic.ActivateUser(userActivationRabbitMq.Code)); }