Пример #1
0
        public Mocks(ViewModelObjects viewModel)
        {
            CredentialsCache      = Substitute.For <Preprocessing.ICredentialsCache>();
            WebBrowserDownloader  = Substitute.For <WebViewTools.IWebViewTools>();
            WebContentCacheConfig = Substitute.For <Persistence.IWebContentCacheConfig>();
            LogsDownloaderConfig  = Substitute.For <Preprocessing.ILogsDownloaderConfig>();

            ShellOpen           = Substitute.For <LogJoint.UI.Presenters.IShellOpen>();
            FileDialogs         = Substitute.For <LogJoint.UI.Presenters.IFileDialogs>();
            PromptDialog        = Substitute.For <LogJoint.UI.Presenters.IPromptDialog>();
            AboutConfig         = Substitute.For <LogJoint.UI.Presenters.About.IAboutConfig>();
            DragDropHandler     = Substitute.For <LogJoint.UI.Presenters.MainForm.IDragDropHandler>();
            SystemThemeDetector = Substitute.For <LogJoint.UI.Presenters.ISystemThemeDetector>();
            Views = Substitute.For <LogJoint.UI.Presenters.Factory.IViewsFactory>();

            Views.CreateLoadedMessagesView().Returns(viewModel.LoadedMessagesViewProxy);
            Views.CreateSourcesManagerView().Returns(viewModel.SourcesManagerViewProxy);
            Views.CreateSourcesListView().Returns(viewModel.SourcesListViewProxy);
            Views.CreatePostprocessingTabPage().Returns(viewModel.PostprocessingTabPage);
            Views.PostprocessingViewsFactory.CreateStateInspectorView().Returns(viewModel.PostprocesssingStateInspectorViewProxy);
            Views.CreatePreprocessingView().Returns(viewModel.PreprocessingUserInteractions);
            Views.CreateSearchPanelView().Returns(viewModel.SearchPanel);
            Views.CreateSearchResultView().Returns(viewModel.SearchResult);
            Views.CreateBookmarksListView().Returns(viewModel.BookmarksList);
            Views.CreateHistoryDialogView().Returns(viewModel.HistoryDialog);
            Views.CreateMessagePropertiesDialogView().Returns(viewModel.MessageProperties);
        }
 public LogSourcePostprocessorControlHandler(
     IManager postprocessorsManager,
     PostprocessorKind postprocessorKind,
     Func <IPostprocessorOutputForm> lazyOutputForm,
     LogJoint.UI.Presenters.IShellOpen shellOpen,
     ITempFilesManager tempFiles
     )
 {
     this.postprocessorsManager = postprocessorsManager;
     this.postprocessorKind     = postprocessorKind;
     this.lazyOutputForm        = lazyOutputForm;
     this.shellOpen             = shellOpen;
     this.tempFiles             = tempFiles;
 }