Beispiel #1
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());
            }
Beispiel #2
0
            public void Populates_Project_With_Values_Retrieved_From_Repository()
            {
                const string workingDirectory      = "asdf";
                var          projectFromRepository = new Project()
                {
                    WorkingDirectory = workingDirectory
                };

                ProjectRepository.Arrange(p => p.GetById(Arg.AnyString)).Returns(projectFromRepository);

                Target.LoadProject("whatever");

                Assert.AreEqual <string>(projectFromRepository.WorkingDirectory, Target.ProjectViewModel.WorkingDirectory);
            }