Exemplo n.º 1
0
        public void AddEditPaymentTypePerCaseIfNull()
        {
            _mockPaymentTypePerCaseRepository = new Mock <IPaymentTypePerCaseRepository>();
            _mockPaymentTypePerCaseRepository.Setup(f => f.AddEditPaymentTypePerCase(It.IsAny <PaymentTypePerCase>())).Returns(0);
            _target = new PaymentTypePerCaseLogic(_mockPaymentTypePerCaseRepository.Object);
            long actual = _target.AddEditPaymentType(null);

            Assert.AreEqual(0, actual);
        }
Exemplo n.º 2
0
        public void EditPaymentTypePerCaseIfNotNull()
        {
            _mockPaymentTypePerCaseRepository = new Mock <IPaymentTypePerCaseRepository>();
            _mockPaymentTypePerCaseRepository.Setup(f => f.AddEditPaymentTypePerCase(It.IsAny <PaymentTypePerCase>())).Returns(1);
            _target = new PaymentTypePerCaseLogic(_mockPaymentTypePerCaseRepository.Object);
            PaymentTypePerCase objPaymentTypePerCase = new PaymentTypePerCase {
                PaymentTypeDetailId = 1
            };
            long actual = _target.AddEditPaymentType(objPaymentTypePerCase);

            Assert.AreEqual(1, actual);
        }
Exemplo n.º 3
0
 public long AddEditPaymentPerCaseDetails(PaymentTypePerCase paymentTypePerCase)
 {
     return(_paymentTypePerCaseDetailsLogic.AddEditPaymentType(paymentTypePerCase));
 }