Reputation: 10264
We're using very descriptive test names for work and it's getting very annoying to horizontally scroll across them. Is there a way to get a method name to span multiple lines in C#?
Something like:
MyMethodNameIsReallyLong
_SoImMakingItSpanMultipleLines
_SoIDontHaveToHorizontallyScroll
_AndMyLifeIsMuchEasier()
{
DoSomething();
}
Thanks.
Upvotes: 7
Views: 1177
Reputation: 2874
I'm pretty sure the short answer is: No.
There is a Description Attribute for TestMethod that "might" be a helpful alternative...
[TestMethod, Description("My really long descriptive test name")]
public void Test99()
{
Assert.Fail();
}
Upvotes: 5
Reputation: 24642
I assume the individual method names are not long enough to require scrolling. If you rearrange the method calls, you'll see more text vertically:
MyMethodNameIsReallyLong(
SoImMakingItSpanMultipleLines(
SoIDontHaveToHorizontallyScroll()
)
);
Upvotes: 0
Reputation:
why choose so much lengthy names. length of the first one is enough to understand MyMethodNameIsReallyLong. Function name should be combination of max 4-5 different words which could be understandable. Such lengthy names should be avoided.
existing examples getElementById/Name - javascript
Upvotes: 0