public function testReturnsAllBlackoutInstancesWithinDateRange()
 {
     $dateRange = new TestDateRange();
     $start = Date::Now();
     $end = Date::Now();
     $instanceId = 12;
     $seriesId = 222;
     $resourceId = 333;
     $userid = 444;
     $scheduleId = 555;
     $resourceName = 'resource 123';
     $firstName = 'f';
     $lastName = 'l';
     $title = 'title';
     $description = 'description';
     $repeatType = RepeatType::Daily;
     $repeat = new RepeatDaily(1, $end->AddDays(2));
     $repeatOptions = $repeat->ConfigurationString();
     $rows[] = $this->GetBlackoutRow($instanceId, $start, $end, $resourceId, $userid, $scheduleId, $title, $description, $firstName, $lastName, $resourceName, $seriesId, $repeatType, $repeatOptions);
     $rows[] = $this->GetBlackoutRow("1", Date::Now(), Date::Now());
     $this->db->SetRows($rows);
     $getBlackoutsCommand = new GetBlackoutListCommand($dateRange->GetBegin(), $dateRange->GetEnd(), ReservationViewRepository::ALL_SCHEDULES);
     $blackouts = $this->repository->GetBlackoutsWithin($dateRange);
     $b = new BlackoutItemView($instanceId, $start->ToUtc(), $end->ToUtc(), $resourceId, $userid, $scheduleId, $title, $description, $firstName, $lastName, $resourceName, $seriesId, $repeatOptions, $repeatType);
     $this->assertEquals($getBlackoutsCommand, $this->db->_LastCommand);
     $this->assertEquals(2, count($blackouts));
     $this->assertEquals($b, $blackouts[0]);
 }