private void AddTestCases(IList<TestCase>/*!*/ cases, Action/*!*/ testMethod) {
var attrs = testMethod.Method.GetCustomAttributes(typeof(OptionsAttribute), false);
if (attrs.Length > 0) {
foreach (OptionsAttribute options in attrs) {
cases.Add(new TestCase {
Name = testMethod.Method.Name,
TestMethod = testMethod,
Options = options,
});
}
} else {
cases.Add(new TestCase {
Name = testMethod.Method.Name,
TestMethod = testMethod,
Options = new OptionsAttribute(),
});
}
}