public void Caption() { Register("Default"); _vm = Create<QueryResultsViewModel>(); Assert.That(_vm.Caption, Is.EqualTo(DefaultCaption)); }
protected override void OnSetup() { var commands = from prop in typeof (GlobalCommands).GetProperties(BindingFlags.Static | BindingFlags.Public) where typeof(CompositeCommand).IsAssignableFrom(prop.PropertyType) select prop.GetValue(null, null) as CompositeCommand; foreach (var command in commands) { command.RegisteredCommands.ForEach(command.UnregisterCommand); } _service = GetMock<ITimeLineService>(); this.GetMock<IQueryResultsView>(); this.GetMock<ILinqApi>(); _aggregator = GetMock<IEventAggregator>(); _querySubmittedEvent = new Mock<QuerySubmittedEvent> {CallBase = true}; _refreshEvent = CreateEvent<RefreshEvent, object>(); _aggregator.Setup(a => a.GetEvent<QuerySubmittedEvent>()).Returns( this._querySubmittedEvent.Object); _menuRoot = new ContextMenuRoot(); Register(_menuRoot); Register(DefaultCaption); _vm = Create<QueryResultsViewModel>(); }