public void saving_the_solution_after_requesting_a_save() { var storage = MockRepository.GenerateStub<INugetStorage>(); var solution = new Solution(); var project = new Project("Test.csproj"); solution.AddProject(project); solution.UseStorage(storage); solution.RequestSave(); solution.Save(); storage.AssertWasCalled(x => x.Write(solution)); storage.AssertWasNotCalled(x => x.Write(project)); }
public void saving_the_solution_with_changed_projects() { var storage = MockRepository.GenerateStub<INugetStorage>(); var solution = new Solution(); var project = new Project("Test.csproj"); solution.AddProject(project); solution.UseStorage(storage); project.AddDependency("FubuCore"); solution.Save(true); storage.AssertWasCalled(x => x.Write(solution)); storage.AssertWasCalled(x => x.Write(project)); }
public void saving_the_solution_with_no_changes_in_projects() { var storage = MockRepository.GenerateStub<INugetStorage>(); var solution = new Solution(); var project = new Project("Test.csproj"); solution.AddProject(project); solution.UseStorage(storage); solution.Save(); storage.AssertWasNotCalled(x => x.Write(solution)); storage.AssertWasNotCalled(x => x.Write(project)); }