Пример #1
0
        public async Task Deve_Atualizar_Usuario_E_Retornar_Ok()
        {
            //arrange
            var usuario = ViewModelBuilder.AtualizarUsuarioCommand();

            _mediator.Setup(s => s.Send(It.IsAny <IRequest <CommandResponse> >(), new System.Threading.CancellationToken()))
            .ReturnsAsync(CommandResponse.Ok).Verifiable();
            //act
            var result = await _controller.AtualizarUsuarioAsync(usuario);

            //assert
            result.Should().BeAssignableTo <OkResult>();
            var vr = result as OkResult;

            vr.StatusCode.Should().Be(StatusCodes.Status200OK);
            _mediator.Verify();
        }