public async void PostLeft_OnSuccess_ShouldReturnResponseFromResponseCreated(string correlationId, BaseRequest <CreateLeftPayLoadRequest> request,
                                                                                     CreatePayLoadResponse response, IActionResult actionResult)
        {
            _payLoadService.Create(correlationId, request.Data).Returns(response);
            _responseCreator.ResponseCreated(response).Returns(actionResult);

            var result = await _sut.Post(correlationId, request);

            result.Should().Be(actionResult);
        }
Пример #2
0
        public async Task <IActionResult> Post([FromRoute] string correlationId, [FromBody] BaseRequest <CreateLeftPayLoadRequest> request)
        {
            var result = await _payLoadCreateService.Create(correlationId, request.Data);

            return(_responseCreator.ResponseCreated(result) ?? _responseCreator.ResponseError());
        }