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"))); }
//bug tests for missing fields private static AbsoluteFilePath CsProjPathTo(string csprojName) { return(AbsoluteFilePath.Value(Path.GetFullPath(csprojName + ".csproj"))); }