public List<TempProject> GetActiveProjects()
{
foreach (Project project in _applicationObject.DTE.Solution.Projects)
{
if (project.FullName.EndsWith(".csproj"))
projects.Add(new TempProject(project));
}
return projects;
}
答案 0 :(得分:1)
[TestFixture]
属性装饰测试类。void
并且不带参数的新公共方法。这将是您的测试方法。[Test]
属性装饰测试方法。答案 1 :(得分:0)
_applicationObject
的模拟实例。这将允许您设置不同的项目集(google for dependency inversion,mocking,Moq)。foreach (Project project in _solution.Projects)