Exemplo n.º 1
0
        public void Test_Build_Account_From_List_Of_Bookings()
        {
            List<IBooking> bookings = new List<IBooking>();
            var bookingMock = new Mock<IBooking>();
            bookingMock.Setup(booking => booking.Value).Returns(300);
            bookingMock.Setup(booking => booking.Date).Returns(new DateTime(2015,1,1));
            bookings.Add(bookingMock.Object);

            Account account = new Account(bookings);

            Assert.AreEqual(1, account.GetNumberOfBookings());
            Assert.AreEqual(300, account.Balance());
        }
Exemplo n.º 2
0
 public void Init()
 {
     account = new Account();
 }
Exemplo n.º 3
0
 public void Cleanup()
 {
     account = null;
 }