Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. public IEnumerable<NUnit.Framework.TestCaseData> TestSource
  2. {
  3. get
  4. {
  5. var assembly = Assembly.GetExecutingAssembly();
  6.  
  7.  
  8. foreach (var order in methods.Keys.OrderBy(x => x))
  9. {
  10. foreach (var methodInfo in methods[order])
  11. {
  12. MethodInfo info = methodInfo;
  13. yield return new NUnit.Framework.TestCaseData(
  14. new TestStructure
  15. {
  16. Test = () =>
  17. {
  18. object classInstance = Activator.CreateInstance(info.DeclaringType, null);
  19. info.Invoke(classInstance, null);
  20. }
  21. }).SetName(methodInfo.Name);
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement