示例#1
0
 public void CreateBooking(Booking b)
 {
     try
     {
         bookingCtrl.CreateBooking(b);
     }
     catch (FaultException) { throw; }
 }
示例#2
0
        public void TestNegativePrice()
        {
            Booking b = new Booking
            {
                EndDate    = DateTime.Now.Date,
                StartDate  = DateTime.Now.Date,
                TotalPrice = -1
            };

            try
            {
                _bCtrl.CreateBooking(b);
                Assert.Fail();
            }
            catch (FaultException e)
            {
                Assert.AreEqual(e.Message, "price error");
            }
        }