Correct Way To Run Test Set Up with Nunit TestCaseSource
问题 I am trying to run multiple tests using TestCaseSource in NUnit. But I am struggling to get the [SetUp] to run when I want it. At the moment it works how I want it to but it doesnt feel "right". So the following is the main test case code (simplified): public class ImportTestCases { ImportTestCases() { TestData.RunTestSetup(); } public static IEnumerable TestCases { get { //run the funciton under test... var results = RunFunctionSubjectToTest(TestData.ImportantVar); //get multiple results...