Ejemplo n.º 1
0
 public void TestUpgradeEmail()
 {
     payment   = PaymentFactory.GetPayment(PaymentTypeEnum.Upgrade);
     email     = payment as IEmail;
     returnMsg = email.SendMail();
     Assert.AreEqual(returnMsg, "Upgrade Email");
 }
Ejemplo n.º 2
0
 public void TestMembershipEmail()
 {
     payment   = PaymentFactory.GetPayment(PaymentTypeEnum.Membership);
     email     = payment as IEmail;
     returnMsg = email.SendMail();
     Assert.AreEqual(returnMsg, "Membership Email");
 }
Ejemplo n.º 3
0
 public void TestBookCommission()
 {
     payment    = PaymentFactory.GetPayment(PaymentTypeEnum.Book);
     commission = payment as ICommission;
     returnMsg  = commission.GenerateCommission();
     Assert.AreEqual(returnMsg, "Book Commission");
 }
Ejemplo n.º 4
0
        public void should_sort_this_ascending()
        {
            //Arrange
            var card = new Visa()
            {
                CCC = "1234"
            };
            var payment = PaymentFactory.GetPayment(card);

            //Act
            var message = payment.Pay(20, card, "1111");

            //Assert
            Assert.AreEqual(message.Text, "Operación realizada correctamente");
            //context.Pay(22, card, "1111");
        }
Ejemplo n.º 5
0
 public void TestLearnToSkiRule()
 {
     payment   = PaymentFactory.GetPayment(PaymentTypeEnum.LearningToSki);
     returnMsg = payment.ExecuteRule();
     Assert.AreEqual(returnMsg, "LearningToSki Rule");
 }
Ejemplo n.º 6
0
 public void TestUpgradeRule()
 {
     payment   = PaymentFactory.GetPayment(PaymentTypeEnum.Upgrade);
     returnMsg = payment.ExecuteRule();
     Assert.AreEqual(returnMsg, "Upgrade Rule");
 }
Ejemplo n.º 7
0
 public void TestMembershipRule()
 {
     payment   = PaymentFactory.GetPayment(PaymentTypeEnum.Membership);
     returnMsg = payment.ExecuteRule();
     Assert.AreEqual(returnMsg, "Membership Rule");
 }
Ejemplo n.º 8
0
 public void TestBookRule()
 {
     payment   = PaymentFactory.GetPayment(PaymentTypeEnum.Book);
     returnMsg = payment.ExecuteRule();
     Assert.AreEqual(returnMsg, "Book Rule");
 }
Ejemplo n.º 9
0
 public void TestPhysicalRule()
 {
     payment   = PaymentFactory.GetPayment(PaymentTypeEnum.Physical);
     returnMsg = payment.ExecuteRule();
     Assert.AreEqual(returnMsg, "Physical Rule");
 }