C# 我可以从另一个类中的TestMethod运行TestClass中定义的所有单元测试吗?

C# 我可以从另一个类中的TestMethod运行TestClass中定义的所有单元测试吗?,c#,.net,unit-testing,tdd,C#,.net,Unit Testing,Tdd,我有一个[TestClass],其中我有很多单元测试方法来测试与“Process_00”相关的任务 我还有另一个[TestClass],我有测试方法来测试各种过程,比如: [TestMethod] public void TestProcess_00 {....} [TestMethod] public void TestProcess_01 {....} [TestMethod] public void TestProcess_02 {....} 是否可以在TestMethod内的Sep

我有一个[TestClass],其中我有很多单元测试方法来测试与“Process_00”相关的任务

我还有另一个[TestClass],我有测试方法来测试各种过程,比如:

[TestMethod]
public void TestProcess_00 {....}

[TestMethod]
public void TestProcess_01 {....}

[TestMethod]
public void TestProcess_02 {....}
是否可以在TestMethod内的Separate[TestClass]中运行所有测试,如:

[TestMethod]
public void TestProcess_00() 
{ 
      Assert.IsTrue( //All the tests in a separete test class pass ); 

}

我认为你不应该这样做。单元测试的目的是验证一段代码,而不是检查其他单元测试是否成功。您可以通过创建测试列表来实现这一点,您可以在其中指定要运行的测试方法。

这有什么意义?您可能需要澄清您正在使用的单元测试框架