예제 #1
0
        public void Add_hint_directory_adds_it_to_the_project()
        {
            const string hintDirectory = "hintDirectory";

            fileSystem.Stub(fs => fs.DirectoryExists(hintDirectory)).Return(true);

            controller.AddHintDirectory(hintDirectory);

            projectController.AssertWasCalled(pc => pc.AddHintDirectory(hintDirectory));
        }
        public void Execute_should_save_the_project()
        {
            const string projectLocation = "projectLocation";

            command.ProjectLocation = projectLocation;

            command.Execute(NullProgressMonitor.CreateInstance());

            projectController.AssertWasCalled(pc => pc.Save(Arg.Is(projectLocation),
                                                            Arg <IProgressMonitor> .Is.Anything));
        }
예제 #3
0
        public void Execute_should_add_files_to_project()
        {
            var files = new List <string> {
                "a"
            };

            command.Files = files;

            command.Execute(MockProgressMonitor.Instance);

            projectController.AssertWasCalled(pc => pc.AddFiles(Arg <IProgressMonitor> .Is.Anything,
                                                                Arg.Is(files)));
        }
예제 #4
0
        public void Execute_should_create_new_project()
        {
            command.Execute(MockProgressMonitor.Instance);

            projectController.AssertWasCalled(pc => pc.NewProject(Arg <IProgressMonitor> .Is.Anything));
        }
예제 #5
0
        public void Execute_should_open_project()
        {
            openProjectCommand.Execute(MockProgressMonitor.Instance);

            projectController.AssertWasCalled(pc => pc.OpenProject(Arg <IProgressMonitor> .Is.Anything, Arg.Is(FileName)));
        }