Yes, you can use the TestCaseSource attribute with multiple arguments. In the above example, you will test TestSwitchMultiItems twice. I used NUnit on the following contrived test code. TestSwitchMultiItems is executed twice, and the trivial call of Assert in each test passes.
[Test, TestCaseSource("GetTestSwitchMultiItems")] public void TestSwitchMultiItems(string switchType, double exchangeRate, object[] sources, object[] equivs) { Assert.AreEqual("Sell", switchType); } public IEnumerable<object[]> GetTestSwitchMultiItems() { yield return new object[] { "Sell", 0.94733, new object[] { new { a = 1176, b = 100, c = 50, d = 5, e = "Sell" } }, new object[] { new { a = 415318955, b = 35, c = 25, d = "Buy", e = 4348, f = 65, g = 45, h = "Buy" } } }; yield return new object[] { "Sell", 0.94733, new object[] { new { a = 1176, b = 100, c = 50, d = 5, e = "Sell" } }, new object[] { new { a = 415318955, b = 35, c = 25, d = "Buy", e = 4348, f = 65, g = 45, h = "Buy" }, new { a = 415318955, b = 35, c = 25, d = "Sell", e = 7348, f = 65, g = 45, h = "Sell" } } }; }