private void changeTest(FlowTestType testType) { var method = GetType().GetMethods(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance).SingleOrDefault(m => m.GetCustomAttribute <FlowTestCaseAttribute>()?.TestType == testType); if (method != null) { method.Invoke(this, Array.Empty <object>()); } }
public FlowTestCaseAttribute(FlowTestType testType) { TestType = testType; }