protected void SetupMockControlFileFor2Podcasts(DiagnosticOutputLevel level = DiagnosticOutputLevel.None) { podcast1Mocker = new PodcastInfoMocker() .ApplyFolder(PODCAST_FOLDER_1); podcast2Mocker = new PodcastInfoMocker() .ApplyFolder(PODCAST_FOLDER_2); var podcasts = new List <IPodcastInfo>(2) { podcast1Mocker.GetMockedPodcastInfo(), podcast2Mocker.GetMockedPodcastInfo() }; MockControlFile = new ControlFileMocker() .ApplySourceRoot(SOURCE_ROOT) .ApplyRetryWaitInSeconds(RETRY_TIME) .ApplyDiagnosticRetainTemporaryFiles(DIAGS) .ApplyMaximumNumberOfConcurrentDownloads(MAX_DOWNLOADS) .ApplyFreeSpaceToLeaveOnDownload(FREE_DISK_SPACE_MB - 1) .ApplyDiagnosticOutput(level) .ApplyPodcasts(podcasts) .GetMockedControlFile(); A.CallTo(() => MockApplicationControlFileProvider.GetApplicationConfiguration()).Returns(MockControlFile); }
private static string WriteDiagnosticOutputLevel(DiagnosticOutputLevel diagnosticOutput) { switch (diagnosticOutput) { case DiagnosticOutputLevel.Verbose: return("verbose"); default: return("none"); } }
protected void SetupMockControlFileFor2Podcasts(DiagnosticOutputLevel level = DiagnosticOutputLevel.None) { podcast1Mocker = new PodcastInfoMocker() .ApplyFolder(PODCAST_FOLDER_1); podcast2Mocker = new PodcastInfoMocker() .ApplyFolder(PODCAST_FOLDER_2); var podcasts = new List <IPodcastInfo>(2) { podcast1Mocker.GetMockedPodcastInfo(), podcast2Mocker.GetMockedPodcastInfo() }; MockControlFile = new ControlFileMocker() .ApplySourceRoot(SOURCE_ROOT) .ApplyPodcasts(podcasts) .GetMockedControlFile(); A.CallTo(() => MockApplicationControlFileProvider.GetApplicationConfiguration()).Returns(MockControlFile); }
/// <summary> /// level of diagnostic output /// </summary> public void SetDiagnosticOutput(DiagnosticOutputLevel level) { DiagnosticOutput = level; }
public ControlFileMocker ApplyDiagnosticOutput(DiagnosticOutputLevel level) { A.CallTo(() => MockControlFile.GetDiagnosticOutput()).Returns(level); return(this); }