示例#1
0
        public bool IsSubmittedApplicationForSelectiveInvoiceDiscountSuccess(
            SelectiveInvoiceDiscountRequestModel product, int companyNumber)
        {
            if (product == null)
            {
                return(false);
            }

            return(_selectInvoiceService.SubmitApplicationFor(
                       companyNumber, product.InvoiceAmount, product.AdvancePercentage
                       ));
        }
        public void Given_CompanyRequestModel_When_CalledWithSelectiveInvoiceDiscount_Then_ShouldReturnTrue(
            SelectiveInvoiceDiscountRequestModel model, int companyNumber)
        {
            _selectInvoiceServiceMock.Setup(_ => _.SubmitApplicationFor(
                                                It.IsAny <int>(),
                                                It.IsAny <decimal>(),
                                                It.IsAny <decimal>()
                                                )
                                            ).Returns(true);

            var result = _productApplicationService.IsSubmittedApplicationForSelectiveInvoiceDiscountSuccess(
                model, companyNumber
                );

            result.Should().Be(true);
        }