c# - How to specify ordering for methods using reflection? -


I want to make a report for the NUnit test in a binary.

Currently they are alphabetically sorted per NUnit default, therefore developers should do things like

  public zero alginfile () {...} public Void BloginPassed () {...}  

In order to get the desired display order, all tests should be run independently, so execution order is not important.

I have thought about adding custom attributes, such as

  [test (displayIndex = 1)] public void FirstTest () {...}  

... but for me this is not very favorable for the developer, especially if you have 50 tests and you want to put one somewhere in the middle, or if you want to add a display index anywhere Forgets.

Is there a cleaner, more robust method of specifying or influencing the display order, or am I stuck with the features?


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -