예제 #1
0
        public void ShouldCorrectlyResolveAbsolutePathsOfReferencedProjects()
        {
            //GIVEN
            var projectFilePath = AbsoluteFilePath.Value(
                $"{FileSystemRoot.PlatformSpecificValue()}{Path.DirectorySeparatorChar}A{Path.DirectorySeparatorChar}A.csproj");
            var referenceToProjectB = "..\\B\\B.csproj";
            var dataAccess          = XmlProjectDataAccess.From(projectFilePath,
                                                                XmlProjectWith(projectFilePath, referenceToProjectB)
                                                                );

            //WHEN
            var dto = dataAccess.BuildCsharpProjectDto();

            //THEN
            dto.ReferencedProjectIds.Should().HaveCount(1);
            dto.ReferencedProjectIds.Should().Equal(
                ImmutableList <ProjectId> .Empty.Add(
                    new ProjectId($"{FileSystemRoot.PlatformSpecificValue()}{Path.DirectorySeparatorChar}B{Path.DirectorySeparatorChar}B.csproj")));
        }
예제 #2
0
        //bug tests for missing fields

        private static AbsoluteFilePath CsProjPathTo(string csprojName)
        {
            return(AbsoluteFilePath.Value(Path.GetFullPath(csprojName + ".csproj")));
        }