コード例 #1
0
            public void WhenProjectIsSelected_ThenCanRetrieveSelectedNode()
            {
                var project = solution.FindProjects().First();

                project.Select();

                var selection = solution.SelectedNodes.OfType <IProjectNode>().First();

                Assert.Equal(project.PhysicalPath, selection.PhysicalPath);
            }
コード例 #2
0
 /// <summary>
 /// Finds all the project nodes in the solution.
 /// </summary>
 /// <param name="solution">The solution to traverse.</param>
 /// <returns>All project nodes that were found.</returns>
 public static IEnumerable <IProjectNode> FindProjects(this ISolutionNode solution) =>
 solution.FindProjects(x => true);