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()); }
public void Init() { account = new Account(); }
public void Cleanup() { account = null; }