public SellOrderResponseDto Execute(SellOrdersRequestDto request) { var validateRequest = ValidateRequestStructure.Execute(request); if (validateRequest.Any()) { return(SellOrderResponseDto.Build(validateRequest, null)); } var validateBusinessRules = validateSellOrderBusinessRules.Execute(request); if (validateBusinessRules.ErrorList != null && validateBusinessRules.ErrorList.Any()) { messageErrorList.AddRange(validateBusinessRules.ErrorList); } request.OrderList = validateBusinessRules.Result; var sellOrderProcess = processSellOrder.Execute(request); if (sellOrderProcess.ErrorList != null && sellOrderProcess.ErrorList.Any()) { messageErrorList.AddRange(sellOrderProcess.ErrorList); } return(SellOrderResponseDto.Build(messageErrorList, sellOrderProcess.Result)); }
internal static void FailureUser(SellOrderResponseDto response) { response.Success.Should().BeTrue(); response.BusinessErrorList.Should().NotBeNull(); response.BusinessErrorList.Any().Should().BeTrue(); }
internal static void Succesfull(SellOrderResponseDto response) { response.Success.Should().BeTrue(); }