public void SalesInvoicecmdProcessExecuted_HasAllowedRealPaymentType_NoMessage() { var warningMessage = new MessageId(typeof(SalesInvoiceBL), nameof(SalesInvoiceBL.SalesInvoice_cmdProcess_Executed)); var salesInvoice = PaymentHelper.CreateInvoiceWithDetail(PaymentHelper.GetCustomer("AMERET"), PaymentHelper.DefaultProduct, 10, 10).Invoice; salesInvoice.cmdProcess.Execute(); Assert.IsFalse(warningMessage.Any(TestContext.Messages)); }
public void SalesInvoicecmdProcessAndOrPayExecuting_WhenThereAreSomeAllowedType_NoMessage() { var message = new MessageId(this, nameof(SalesInvoice_cmdProcessAndOrPay_Executing)); var customer = TestContext.GetEntity <Customer>("AMERET"); var invoice = PaymentHelper.CreateInvoiceWithDetail(PaymentHelper.GetCustomer("AMERET"), PaymentHelper.DefaultProduct, 1, 12).Invoice; invoice.cmdProcessAndOrPay.Execute(); Assert.IsFalse(message.Any(TestContext.Messages)); }
public void SalesInvoicecmdProcessAndOrPayExecuting_ThereIsNotAnyAllowedType_DisplayMessage() { var message = new MessageId(this, nameof(SalesInvoice_cmdProcessAndOrPay_Executing)); var salesInvoice = PaymentHelper.CreateInvoiceWithDetail(PaymentHelper.GetCustomer("LGBUI"), PaymentHelper.DefaultProduct, 1, 12).Invoice; salesInvoice.BillingCustomer.AllowedPaymentTypeLinks.Clear(); salesInvoice.cmdProcessAndOrPay.Execute(); Assert.IsTrue(message.Any(TestContext.Messages)); }
public void SalesInvoicecmdProcessExecuted_NoAllowedPaymentType_DisplayMessage() { var warningMessage = new MessageId(typeof(SalesInvoiceBL), nameof(SalesInvoiceBL.SalesInvoice_cmdProcess_Executed)); var customer = PaymentHelper.GetCustomer("ZURMIK"); var salesInvoice = PaymentHelper.CreateInvoiceWithDetail(customer, PaymentHelper.DefaultProduct, 10, 10).Invoice; customer.AllowedPaymentTypes.Clear(); salesInvoice.cmdProcess.Execute(); Assert.IsTrue(warningMessage.Any(TestContext.Messages)); }