public void AllowEmployeeToBookTypeOfRoom() { bookingPolicyService.SetEmployeePolicy(employeeId, new List <RoomType> { Standard }); Assert.True(bookingPolicyService.isBookingAllowed(employeeId, Standard)); }
public void TheOneWhereTheEmployeeDoesNotHaveSufficientPrivilege() { RegisterAHotel() .WithId(hotelId) .WithAStandardRoomAt(101) .WithAMasterRoomAt(501) .To(hotelService); bookingPolicyService.SetEmployeePolicy(employeeId, new List <RoomType>() { Standard }); Assert.Throws <InsufficientPrivilege>(() => bookingService.Book(employeeId, hotelId, Master, Oct12th, Oct19th)); }