/**
  * Constructor.
  *
  * @param                   ilDate seed date
  * @param                   int    type of schedule (TYPE_DAY,TYPE_WEEK or TYPE_MONTH)
  * @param                   int    user_id
  * @param ilRoomSharingRoom $room
  */
 public function __construct(ilDate $seed, $a_type, $a_user_id = 0, ilRoomSharingRoom $room)
 {
     global $ilUser, $ilDB;
     $this->room_obj = $room;
     $this->db = $ilDB;
     $this->type = $a_type;
     $this->initPeriod($seed);
     if (!$a_user_id || $a_user_id == $ilUser->getId()) {
         $this->user = $ilUser;
     } else {
         $this->user = new ilObjUser($a_user_id);
     }
     $this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
     $this->weekstart = $this->user_settings->getWeekStart();
     $this->timezone = $this->user->getTimeZone();
     $this->ilRoomSharingDatabase = new ilRoomsharingDatabase($room->getPoolId());
 }
 /**
  * @covers ilRoomSharingRoom::setPoolId
  */
 public function testSetPoolId()
 {
     self::$room->setPoolId(80);
     $this->assertEquals(80, self::$room->getPoolId());
 }