Пример #1
0
        public void GetAllBookingsByUserIdTest()
        {
            var bookingrepo = new BookingRepo(bookcontextmock.Object);
            var bookinglist = bookingrepo.GetById(1);

            Assert.AreEqual(2, bookinglist.Count());
        }
Пример #2
0
        private void btnDel(object sender, RoutedEventArgs e)
        {
            string[] ids = (sender as Button).Tag.ToString().Split(',');
            int      id  = Convert.ToInt32(ids[0]);

            Logic.Booking book = BookRep.GetById(Convert.ToInt32(ids[1]));
            Equipment     eq   = eqRep.GetById(id);


            DataFac.DeleteEquipmentFromBooking(eq, book);
            BookingGetSearched(search.GetPhone());
        }
Пример #3
0
 public void CreateBooking()
 {
     EquipList.Add(new Equipment(1, 2, DateTime.Now));
     Book.Add(new Logic.Booking(1, EquipList, DateTime.Now, DateTime.Today, "41412622", true));
     Logic.Booking bk = Book.GetById(1);
     Assert.AreEqual(bk._phone, "41412622");
 }