public void Map_WhenMappingFromCreateLeftPayLoadRequestToPayLoadCreateCommand_ShouldMapAsExpected(IMapper sut, CreateLeftPayLoadRequest createLeftPayLoadRequest, string correlationId) { var result = sut.Map <PayLoadCreateCommand>(createLeftPayLoadRequest, ctx => ctx.Items["correlationId"] = correlationId); result.CorrelationId.Should().Be(correlationId); result.Content.Should().BeEquivalentTo(createLeftPayLoadRequest.Content); result.Side.Should().Be(SideEnum.Left); }
public async void Create_GuardTests(string correlationId, CreateLeftPayLoadRequest request, PayLoadCreateCommand payLoadCreateCommand) { _mapper.Map <PayLoadCreateCommand>(request, opt => opt.Items["correlationId"] = correlationId).Returns(payLoadCreateCommand); var result = await _sut.Create(correlationId, request); }