예제 #1
0
            public void Invokes_Repository_Create_With_Project_Whose_Path_Reflects_Passed_In_Value()
            {
                const string filePath = "asdf";

                Target.CreateNewProject(filePath);

                ProjectRepository.Assert(r => r.Save(Arg.Matches <Project>(p => p.ProjectPath == filePath)), Occurs.Once());
            }
예제 #2
0
            public void Invokes_Repository_Update_Method()
            {
                var theProject = new Project()
                {
                    WorkingDirectory = "fdsa"
                };

                ProjectRepository.Arrange(pr => pr.GetById(Arg.AnyString)).Returns(theProject);

                Target.LoadProject("asdf");
                Target.SaveProject();

                ProjectRepository.Assert(pr => pr.Save(theProject), Occurs.Once());
            }
예제 #3
0
            public void Invokes_Repository_BuildWorkspace_When_Executed()
            {
                Target.CreateWorkingCommand.Execute(null);

                ProjectRepository.Assert(pr => pr.BuildWorkspace(Arg.IsAny <IProject>()), Occurs.Once());
            }