public async Task ShouldUpdateValidationValid() { var expected = "an implementation timescales description"; var viewModel = new UpdateImplementationTimescalesViewModel { Description = expected }; var result = (await _controller.Update(SolutionId, viewModel).ConfigureAwait(false)) as NoContentResult; result.StatusCode.Should().Be((int)HttpStatusCode.NoContent); _mediatorMock.Verify(m => m.Send(It.Is <UpdateImplementationTimescalesCommand>(q => q.SolutionId == SolutionId && q.Description == expected), It.IsAny <CancellationToken>()), Times.Once); }
public async Task ShouldUpdateValidationValid() { const string expected = "an implementation timescales description"; var model = new UpdateImplementationTimescalesViewModel { Description = expected }; var result = await controller.Update(SolutionId, model) as NoContentResult; Assert.NotNull(result); result.StatusCode.Should().Be(StatusCodes.Status204NoContent); mediatorMock.Verify(m => m.Send( It.Is <UpdateImplementationTimescalesCommand>(c => c.SolutionId == SolutionId && c.Description == expected), It.IsAny <CancellationToken>())); }