コード例 #1
0
        public void EnteringInitialNameModeBeginsEdit()
        {
            var folder = new LibraryFolderNode(_unitTestDispatcher.Dispatcher, _eventAggregator);

            folder.EnterInitialNameMode();

            Assert.That(folder.EditLabel, Is.True);
        }
コード例 #2
0
        public void InInitialNameModeCancelEditRequestsDelete()
        {
            var folder = new LibraryFolderNode(_unitTestDispatcher.Dispatcher, _eventAggregator)
            {
                Id = TestIds.GetId(0)
            };

            folder.EnterInitialNameMode();
            folder.CancelEditLabel.Execute(null);

            Assert.That(_listener.Requests, Is.EqualTo("Select Id0\r\nRemove Id0\r\n"));
        }
コード例 #3
0
        public void AfterInitialEditEndsCancelEditDoesNotRequestDelete()
        {
            var folder = new LibraryFolderNode(_unitTestDispatcher.Dispatcher, _eventAggregator)
            {
                Id = TestIds.GetId(0)
            };

            folder.EnterInitialNameMode();
            folder.FinishEditLabel.Execute(null);

            folder.BeginEditLabel.Execute(null);
            folder.CancelEditLabel.Execute(null);

            Assert.That(_listener.Requests, Is.EqualTo("Select Id0\r\nRename Id0 \r\nSelect Id0\r\n"));
        }