public Given_a_project_with_a_reference_for_a_project_not_existing_in_solution()
            {
                var projectsInSolution = new[] { ProjectReferenceTestSample.ReferenceFromSolutionToProjectWithoutReferences, ProjectReferenceTestSample.ReferenceFromSolutionToProjectWithReferences };
                var parserMock = new Mock<IProjectParser>();
                parserMock
                    .Setup(p => p.ParseProjectReferences(ProjectReferenceTestSample.ReferenceFromSolutionToProjectWithReferences.FullPath))
                    .Returns(new[] { ProjectReferenceTestSample.ReferenceFromProjectToAProjectWithSameName });

                this.check = new ProjectReferenceExistsInSolutionCheck(projectsInSolution, parserMock.Object);
                this.reference = ProjectReferenceTestSample.ReferenceFromSolutionToProjectWithReferences;
            }
            public Given_a_project_with_two_references_with_same_name_where_only_one_project_exists_in_solution()
            {
                var projectsInSolution = new[] { ProjectReferenceTestSample.ReferenceFromSolutionToProjectWithReferences, ProjectReferenceTestSample.AReferenceFromSolutionToProjectWithSameName, };
                var parserMock = new Mock<IProjectParser>();
                parserMock
                    .Setup(p => p.ParseProjectReferences(ProjectReferenceTestSample.ReferenceFromSolutionToProjectWithReferences.FullPath))
                    .Returns(new[] { ProjectReferenceTestSample.ReferenceFromProjectToAProjectWithSameName, ProjectReferenceTestSample.ReferenceFromProjectToAnotherProjectWithSameName });

                this.check = new ProjectReferenceExistsInSolutionCheck(projectsInSolution, parserMock.Object);
                this.reference = ProjectReferenceTestSample.ReferenceFromSolutionToProjectWithReferences;
            }
Ejemplo n.º 3
0
 public SolutionIntegrityCheck(IFileSystem fileSystem, ProjectReference[] projectsInSolution, IProjectParser parser)
 {
     this.refExists = new ReferenceExistsCheck(fileSystem);
     this.refInSolution = new ProjectReferenceExistsInSolutionCheck(projectsInSolution, parser);
 }