public void CreateBooking(Booking b) { try { bookingCtrl.CreateBooking(b); } catch (FaultException) { throw; } }
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"); } }