Exemplo n.º 1
0
        public async Task PaymentOptionnameExistsTest()
        {
            IPaymentOptionsRepository paymentOptionsRepository = GetIPaymentOptionsRepository();
            string cardName = "Visa Card";
            var    result   = await paymentOptionsRepository.IsPaymentExists(cardName);

            Assert.True(
                result == true,
                "Payment name is exist.");

            Assert.False(
                result == false,
                "Payment name should not exist.");
        }
Exemplo n.º 2
0
        public async Task InsertIPaymentOptionsTest()
        {
            try
            {
                IPaymentOptionsRepository paymentOptionsRepository = GetIPaymentOptionsRepository();

                PaymentOptions payment = new PaymentOptions {
                    Name = "Visa Card"
                };
                var result = await paymentOptionsRepository.InsertPaymentOptions(payment);

                Assert.True(Convert.ToInt32(result) > 0, "The DataSved Successfully !!");
            }
            catch (Exception ex)
            {
                Assert.NotNull(ex);
                //Assert.IsType<InvalidOperationException>(ex);
            }

            //Assert.f(Convert.ToInt32(result) > 0, "The DataSved Successfully !!");

            // moduleRepository.in(module);
            //  var result = moduleRepository
        }
 //public PaymentOptionsController(BusinessRulesDataEngineContext context)
 //{
 //    _context = context;
 //}
 public PaymentOptionsController()
 {
     paymentOptionsRepository = new PaymentOptionsRepository(new BusinessRulesDataEngineContext());;
 }