private function ExpectPageToReturnRepeatInfo($repeatType = RepeatType::None, $repeatInterval = null, $endDateString = null, $repeatDays = null, $repeatMonthlyType = null)
 {
     $this->page->expects($this->any())->method('GetRepeatType')->will($this->returnValue($repeatType));
     $this->page->expects($this->any())->method('GetRepeatInterval')->will($this->returnValue($repeatInterval));
     $this->page->expects($this->any())->method('GetRepeatTerminationDate')->will($this->returnValue($endDateString));
     $this->page->expects($this->any())->method('GetRepeatWeekdays')->will($this->returnValue($repeatDays));
     $this->page->expects($this->any())->method('GetRepeatMonthlyType')->will($this->returnValue($repeatMonthlyType));
 }
 public function UpdateBlackout()
 {
     $session = ServiceLocator::GetServer()->GetUserSession();
     $id = $this->page->GetUpdateBlackoutId();
     $scope = $this->page->GetSeriesUpdateScope();
     Log::Debug('Updating blackout. BlackoutId=%s, UpdateScope=%s', $id, $scope);
     $resourceIds = $this->page->GetBlackoutResourceIds();
     $startDate = $this->page->GetBlackoutStartDate();
     $startTime = $this->page->GetBlackoutStartTime();
     $endDate = $this->page->GetBlackoutEndDate();
     $endTime = $this->page->GetBlackoutEndTime();
     $blackoutDate = DateRange::Create($startDate . ' ' . $startTime, $endDate . ' ' . $endTime, $session->Timezone);
     $title = $this->page->GetBlackoutTitle();
     $conflictAction = $this->page->GetBlackoutConflictAction();
     $repeatOptionsFactory = new RepeatOptionsFactory();
     $repeatOptions = $repeatOptionsFactory->CreateFromComposite($this->page, $session->Timezone);
     $result = $this->manageBlackoutsService->Update($id, $blackoutDate, $resourceIds, $title, ReservationConflictResolution::Create($conflictAction), $repeatOptions, $scope);
     $this->page->ShowUpdateResult($result->WasSuccessful(), $result->Message(), $result->ConflictingReservations(), $result->ConflictingBlackouts(), $session->Timezone);
 }