public async Task UpdateValidUpdatesRequirements() { var request = new UpdateHardwareRequirementsRequest { HardwareRequirements = "New Hardware Requirements" }; var result = (await _controller.UpdateHardwareRequirements(_solutionId, request).ConfigureAwait(false)) as NoContentResult; result.StatusCode.Should().Be((int)HttpStatusCode.NoContent); _mediatorMock.Verify(x => x.Send( It.Is <UpdateSolutionNativeMobileHardwareRequirementsCommand>(c => c.HardwareRequirements == "New Hardware Requirements" && c.SolutionId == _solutionId), It.IsAny <CancellationToken>()), Times.Once); }
public async Task UpdateValidUpdatesRequirements() { var request = new UpdateHardwareRequirementsRequest { HardwareRequirements = "New Hardware Requirements" }; var result = await controller.UpdateHardwareRequirements(SolutionId, request) as NoContentResult; Expression <Func <UpdateSolutionNativeMobileHardwareRequirementsCommand, bool> > match = c => c.HardwareRequirements == "New Hardware Requirements" && c.SolutionId == SolutionId; Assert.NotNull(result); result.StatusCode.Should().Be(StatusCodes.Status204NoContent); mediatorMock.Verify(m => m.Send(It.Is(match), It.IsAny <CancellationToken>())); }