Ejemplo n.º 1
0
        public void Doesnt_process_selection_when_no_valid_task_found()
        {
            provider.Stub(p => p.GetPossibleRefactoring()).Return(new List <IRefactorTask> {
                invalidTask
            }).Repeat.Once();

            subject.Update();
            subject.Run();

            controller.AssertWasNotCalled(c => c.ProcessSelection(Arg <IEnumerable <IRefactorTask> > .Is.Anything, Arg <RefactoringOptions> .Is.Anything));
        }
Ejemplo n.º 2
0
        public void Enables_command_info_when_any_valid_tasks_were_found()
        {
            var info = new MonoDevelop.Components.Commands.CommandInfo {
                Enabled = false
            };

            subject.Update(info);

            Assert.IsTrue(info.Enabled, "Command info was not enabled as expected");
        }