コード例 #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
ファイル: UnitTest1.cs プロジェクト: CSondergaard/Diving2000
 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");
 }