Is there a way to span long method names across multiple lines?
We're using very descriptive test names for work and it's开发者_StackOverflow社区 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.
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();
}
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
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()
)
);
精彩评论