public void SetUp()
        {
            _eventAggregator = new UnitTestEventAggregator();
            _listener        = new EventListener();
            _eventAggregator.AddListener(_listener);
            _unitTestDispatcher = new UnitTestDispatcher();
            _node      = new LibraryFileNode(_unitTestDispatcher.Dispatcher, _eventAggregator);
            _node.Id   = TestIds.GetId(0);
            _node.Id   = TestIds.GetId(0);
            _node.Name = "original name";

            _folderNode = new LibraryFolderNode(_unitTestDispatcher.Dispatcher, _eventAggregator)
            {
                Id   = TestIds.GetId(1),
                Path = new [] { "Parent" }
            };
        }
Exemple #2
0
        public void AddedNodeIsSelected()
        {
            WaitLoad();

            _frame.RunDispatcher();

            var firstPath   = _paths.AllPathIds.Any() ? _paths.AllPathIds.First() : -1;
            var pathStrings = _paths.GetPathStrings(firstPath);

            var libraryFileNode = new LibraryFileNode(_frame.Dispatcher, _eventAggregator)
            {
                Path = pathStrings
            };

            _view.AddNode(libraryFileNode);

            Assert.That(_view.SelectedItem, Is.SameAs(libraryFileNode));
        }