-
-
Notifications
You must be signed in to change notification settings - Fork 93
retain file [argument] order in test explorer #3260
-
so it would be CreateBoxStringTest #1 (0, 1, 1, 1, 1, a) ... ?
I'd hate to add an additional parameter there for the general case, and reordering my testcases is undesirable since the kinda tell a story, sometimes...
thank you.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments
-
That'd be a hacky workaround.
The test explorer UI is owned by Microsoft / VS. So worth raising an issue with them.
Beta Was this translation helpful? Give feedback.
All reactions
-
i am quite sure that they do order those things on purpose, since the test explorer's columns can be sorted - i don't think we can convince them to change that behaviour (and i know that it wouldn't be implemented any time soonish :-P
imagethis is the hacky workaround using a DisplayNameFormatter :-)
btw can i convince you to render a space after the method names before the parentheses in the default implementation of .GetDisplayName()? so i don't need the ugly .Replace?
public class OrderedArgumentsAttribute : DisplayNameFormatterAttribute { static int Counter; // <-- hacky and probably bad, but works for now :-) protected override string FormatDisplayName(DiscoveredTestContext context) => $"{Counter++} {context.GetDisplayName().Replace("(", " (")}"; }
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.