1 write to MappedSourceRoots
Microsoft.Build.Tasks.CodeAnalysis (1)
49 references to MappedSourceRoots
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (49)
MapSourceRootTests.cs (49)
57RoslynDebug.Assert(task.MappedSourceRoots is object);
58Assert.Equal(4, task.MappedSourceRoots.Length);
60Assert.Equal(Utilities.FixFilePath(@"c:\packages\SourcePackage1\"), task.MappedSourceRoots[0].ItemSpec);
61Assert.Equal(@"/_1/", task.MappedSourceRoots[0].GetMetadata("MappedPath"));
63Assert.Equal(Utilities.FixFilePath(@"/packages/SourcePackage2/"), task.MappedSourceRoots[1].ItemSpec);
64Assert.Equal(@"/_2/", task.MappedSourceRoots[1].GetMetadata("MappedPath"));
66Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\"), task.MappedSourceRoots[2].ItemSpec);
67Assert.Equal(@"/_/", task.MappedSourceRoots[2].GetMetadata("MappedPath"));
68Assert.Equal(@"Git", task.MappedSourceRoots[2].GetMetadata("SourceControl"));
70Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\b\"), task.MappedSourceRoots[3].ItemSpec);
71Assert.Equal(@"/_/a/b/", task.MappedSourceRoots[3].GetMetadata("MappedPath"));
72Assert.Equal(@"Git", task.MappedSourceRoots[3].GetMetadata("SourceControl"));
73Assert.Equal(@"some value", task.MappedSourceRoots[3].GetMetadata("some metadata"));
106RoslynDebug.Assert(task.MappedSourceRoots is object);
107Assert.Equal(3, task.MappedSourceRoots.Length);
109Assert.Equal(Utilities.FixFilePath(@"!@#:;$%^&*()_+|{}\"), task.MappedSourceRoots[0].ItemSpec);
110Assert.Equal(@"/_1/", task.MappedSourceRoots[0].GetMetadata("MappedPath"));
112Assert.Equal(Utilities.FixFilePath("****/"), task.MappedSourceRoots[1].ItemSpec);
113Assert.Equal(@"/_/", task.MappedSourceRoots[1].GetMetadata("MappedPath"));
114Assert.Equal(@"Git", task.MappedSourceRoots[1].GetMetadata("SourceControl"));
116Assert.Equal(Utilities.FixFilePath(@"****\|||:;\"), task.MappedSourceRoots[2].ItemSpec);
117Assert.Equal(@"/_/|||:;/", task.MappedSourceRoots[2].GetMetadata("MappedPath"));
118Assert.Equal(@"Git", task.MappedSourceRoots[2].GetMetadata("SourceControl"));
183RoslynDebug.Assert(task.MappedSourceRoots is object);
184Assert.Equal(4, task.MappedSourceRoots.Length);
186Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\"), task.MappedSourceRoots[0].ItemSpec);
187Assert.Equal(@"/_/", task.MappedSourceRoots[0].GetMetadata("MappedPath"));
189Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\a\"), task.MappedSourceRoots[1].ItemSpec);
190Assert.Equal(@"/_/a/a/", task.MappedSourceRoots[1].GetMetadata("MappedPath"));
192Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\b\"), task.MappedSourceRoots[2].ItemSpec);
193Assert.Equal(@"/_/a/b/", task.MappedSourceRoots[2].GetMetadata("MappedPath"));
195Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\c\"), task.MappedSourceRoots[3].ItemSpec);
196Assert.Equal(@"/_/a/c/", task.MappedSourceRoots[3].GetMetadata("MappedPath"));
221RoslynDebug.Assert(task.MappedSourceRoots is object);
222Assert.Equal(3, task.MappedSourceRoots.Length);
224Assert.Equal(Utilities.FixFilePath(@"c:\packages\SourcePackage1\"), task.MappedSourceRoots[0].ItemSpec);
225Assert.Equal(@"/_/", task.MappedSourceRoots[0].GetMetadata("MappedPath"));
227Assert.Equal(Utilities.FixFilePath(@"C:\packages\SourcePackage1\"), task.MappedSourceRoots[1].ItemSpec);
228Assert.Equal(@"/_1/", task.MappedSourceRoots[1].GetMetadata("MappedPath"));
230Assert.Equal(Utilities.FixFilePath(@"c:\packages\SourcePackage2\"), task.MappedSourceRoots[2].ItemSpec);
231Assert.Equal(@"/_2/", task.MappedSourceRoots[2].GetMetadata("MappedPath"));
273Assert.Null(task.MappedSourceRoots);
343AssertEx.NotNull(task.MappedSourceRoots);
349}, task.MappedSourceRoots.Select(InspectSourceRoot));
380Assert.Null(task.MappedSourceRoots);
409Assert.Null(task.MappedSourceRoots);
443Assert.Null(task.MappedSourceRoots);
448AssertEx.NotNull(task.MappedSourceRoots);
452}, task.MappedSourceRoots.Select(InspectSourceRoot));