示例#1
0
        public void VerifyThatPropertiesAreSetByConstructor()
        {
            var row = new FileTypeRowViewModel(this.fileType, this.session.Object, null);

            Assert.AreEqual("cdp", row.ShortName);
            Assert.AreEqual("rdl", row.ContainerRdl);
        }
示例#2
0
        public void VerifyThatChangeMessageIsProcessed()
        {
            var row = new FileTypeRowViewModel(this.fileType, this.session.Object, null);

            this.fileType.ShortName = "cdp4";

            this.revInfo.SetValue(this.fileType, 10);
            CDPMessageBus.Current.SendObjectChangeEvent(this.fileType, EventKind.Updated);

            Assert.AreEqual("cdp4", row.ShortName);
        }
示例#3
0
            /// <summary>
            /// Initializes a new instance of the <see cref="TestBrowserViewModel"/> class.
            /// </summary>
            /// <param name="session">the associated <see cref="ISession"/></param>
            /// <param name="siteDir">The unique <see cref="SiteDirectory"/></param>
            /// <param name="thingDialogNavigationService">The <see cref="IThingDialogNavigationService"/></param>
            /// <param name="panelNavigationService">The <see cref="IPanelNavigationService"/></param>
            /// <param name="dialogNavigationService">The <see cref="IDialogNavigationService"/></param>
            internal TestBrowserViewModel(
                ISession session,
                SiteDirectory siteDir,
                IThingDialogNavigationService thingDialogNavigationService,
                IPanelNavigationService panelNavigationService,
                IDialogNavigationService dialogNavigationService,
                IPluginSettingsService pluginSettingsService)
                : base(siteDir, session, thingDialogNavigationService, panelNavigationService, dialogNavigationService, pluginSettingsService)
            {
                this.FileTypes = new ReactiveList <FileTypeRowViewModel>();

                var fileType     = new FileType();
                var rowViewModel = new FileTypeRowViewModel(fileType, session, this);

                this.FileTypes.Add(rowViewModel);
            }