Exemplo n.º 1
0
        public void Transaction_ShouldBe_Refund_When_Negative()
        {
            Transaction t = new Transaction(Guid.NewGuid(), -100, "124", TransactionProcessor.FakePaymentProcessor);
            Assert.IsTrue(t.IsRefund);

        }
 public IQueryable<Transaction> GetTransactions()
 {
     var result = new List<Transaction>();
     for (int i = 1; i < 3;i++ )
     {
         Transaction p = new Transaction(Guid.NewGuid(), 10, "1234", TransactionProcessor.FakePaymentProcessor);
         result.Add(p);
     }
     return result.AsQueryable();
 }
Exemplo n.º 3
0
        public void Transaction_Should_Have_ID_Amount_OrderID_Authorization_Date_Notes_Processor()
        {
            
            Guid orderID=Guid.NewGuid();
            Guid ID=Guid.NewGuid();

            Transaction p = new Transaction(ID, orderID, 100, DateTime.Now, "1234", "notes", TransactionProcessor.FakePaymentProcessor);
            Assert.AreEqual(ID, p.ID);
            Assert.AreEqual(orderID, p.OrderID);
            Assert.AreEqual(100, p.Amount);
            Assert.AreEqual("1234", p.AuthorizationCode);
            Assert.AreEqual("notes", p.Notes);
            Assert.AreEqual(TransactionProcessor.FakePaymentProcessor, p.Processor);

        }