Пример #1
0
        public void GetSelectedBookingBalanceInExternalCurrency_Booking_ExchangeRateNull()
        {
            BookingToView booking4 = new BookingToView(OBookingDirections.Credit, 133, new DateTime(2008, 1, 6),
                                                        null,"S/01/2008-3","LDRE37");

            _bookingToViewStock.Add(booking4);
            Assert.IsFalse(_bookingToViewStock.GetSelectedBookingBalanceInExternalCurrency.HasValue);
        }
Пример #2
0
        public void GetSelectedBookingBalanceInExternalCurrency_Booking_ExchangeRateNotNull()
        {
            BookingToView booking4 = new BookingToView(OBookingDirections.Credit, 133, new DateTime(2008, 1, 6),
                                                        5.45,"S/01/2008-3","LDRE37");

            _bookingToViewStock.Add(booking4);

            Assert.AreEqual(-2552.35m,_bookingToViewStock.GetSelectedBookingBalanceInExternalCurrency.Value);
        }
Пример #3
0
        public void SetUp()
        {
            Account _account = new Account();
            _account.Balance = 300;

            BookingToView _booking1 = new BookingToView(OBookingDirections.Debit,1000,new DateTime(2008,1,1),
                                                        3.45,"S/01/2008-1","LDRE34");

            BookingToView _booking2 = new BookingToView(OBookingDirections.Credit, 1333, new DateTime(2008, 1, 2),
                                                        4,"S/01/2008-1","LDRE35");

            BookingToView _booking3 = new BookingToView(OBookingDirections.Debit, 10, new DateTime(2008, 1, 5),
                                                        5.45,"S/01/2008-3","LDRE36");

            _bookingToViewStock = new BookingToViewStock(_account);
            _bookingToViewStock.Add(_booking1);
            _bookingToViewStock.Add(_booking2);
            _bookingToViewStock.Add(_booking3);
        }
 private static void _AssertSelectedViewableBooking(BookingToView pBooking, OBookingDirections pDirection, OCurrency pAmount, DateTime pDate, 
     double? pExchangeRate, string pContractCode, string pEventCode)
 {
     Assert.AreEqual(pDirection, pBooking.Direction);
     Assert.AreEqual(pAmount.Value, pBooking.AmountInternal.Value);
     Assert.AreEqual(pDate, pBooking.Date);
     Assert.AreEqual(pExchangeRate, pBooking.ExchangeRate);
     Assert.AreEqual(pContractCode, pBooking.ContractCode);
     Assert.AreEqual(pEventCode, pBooking.EventCode);
 }