public void CanCreateNewProjectWithNullFacade()
        {
            Func <string, IDisposable> timerFunc = s => new MockDisposable();

            var command = new NewProjectCommand(null, timerFunc);

            Assert.IsFalse(command.CanExecute(null));
        }
        public void CanCreateNewProjectWithFacadeUnableToCreate()
        {
            var project = new Mock <ILinkToProjects>();
            {
                project.Setup(p => p.CanCreateNewProject())
                .Returns(false);
            }

            Func <string, IDisposable> timerFunc = s => new MockDisposable();

            var command = new NewProjectCommand(project.Object, timerFunc);

            Assert.IsFalse(command.CanExecute(null));
        }
        public void CreateNewProject()
        {
            var project = new Mock <ILinkToProjects>();
            {
                project.Setup(p => p.NewProject())
                .Verifiable();
            }

            Func <string, IDisposable> timerFunc = s => new MockDisposable();

            var command = new NewProjectCommand(project.Object, timerFunc);

            command.Execute(null);

            project.Verify(p => p.NewProject(), Times.Once());
        }