public async Task ShouldUpdateValidationValid() { var expected = "an integrations url"; var viewModel = new UpdateIntegrationsViewModel { Url = 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 <UpdateIntegrationsCommand>(q => q.SolutionId == SolutionId && q.Url == expected), It.IsAny <CancellationToken>()), Times.Once); }
public async Task ShouldUpdateValidationValid() { const string expected = "an integrations url"; var model = new UpdateIntegrationsViewModel { Url = 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 <UpdateIntegrationsCommand>(c => c.SolutionId == SolutionId && c.Url == expected), It.IsAny <CancellationToken>())); }