コード例 #1
0
        public void TestInitialize()
        {
            windowManager     = Substitute.For <WindowManagerEx>();
            endpointExplorer  = Substitute.For <EndpointExplorerViewModel>();
            messageList       = Substitute.For <MessageListViewModel>();
            licenseStatusBar  = Substitute.For <LicenseStatusBar>();
            statusbarManager  = new StatusBarManager(licenseStatusBar);
            eventAggregator   = Substitute.For <IEventAggregator>();
            workNotifier      = Substitute.For <IWorkNotifier>();
            messageFlow       = Substitute.For <MessageFlowViewModel>();
            sagaWindow        = Substitute.For <SagaWindowViewModel>();
            messageBodyView   = Substitute.For <MessageBodyViewModel>();
            messageProperties = Substitute.For <MessagePropertiesViewModel>();
            view                = Substitute.For <IShellViewStub>();
            headerView          = Substitute.For <MessageHeadersViewModel>();
            sequenceDiagramView = Substitute.For <SequenceDiagramViewModel>();
            settingsProvider    = Substitute.For <ISettingsProvider>();
            licenseManager      = Substitute.For <AppLicenseManager>();
            logWindow           = Substitute.For <LogWindowViewModel>();
            settingsProvider.GetSettings <ProfilerSettings>().Returns(DefaultAppSetting());
            app = Substitute.For <IAppCommands>();
            commandLineArgParser = MockEmptyStartupOptions();

            shell = new ShellViewModel(
                app,
                windowManager,
                endpointExplorer,
                messageList,
                () => Substitute.For <ServiceControlConnectionViewModel>(),
                () => Substitute.For <LicenseMessageBoxViewModel>(),
                statusbarManager,
                eventAggregator,
                workNotifier,
                licenseManager,
                messageFlow,
                sagaWindow,
                messageBodyView,
                headerView,
                sequenceDiagramView,
                settingsProvider,
                messageProperties,
                logWindow,
                commandLineArgParser);

            ((IViewAware)shell).AttachView(view);
        }
コード例 #2
0
 public void TestInitialize()
 {
     licenseStatusBar = new LicenseStatusBar(
         Substitute.For <IWindowManagerEx>(),
         Substitute.For <NetworkOperations>());
 }