Hi,
I like to write my unit test names in the format:
<Subject>_<Scenario>_<ExpectedResult>()
Which gives me test names such as:
StringParser_GivenAnEmptyString_ReturnsNull()
Which I believe is quite a common pattern to use. However GhostDoc doesn't make a very good job of these, because it doesn't understand the significance of the underscores (_). I'd like to be able to write a rule that will produce the following summary for the above:
Tests that String Parser when given an empty string returns null.
Or something similar.
2 possible suggestions I can think of to solve this:
(a) Treat underscore to a sentence seperator, so I can use something like $(MethodName.Sentence[0].All) in the template text.
(b) When using regex for matching, allow the match to be referred to in the template text. e.g. if (.*)_(.*)_(.*) is the regex then I can use $(MethodName.Group[0].All) in the template text.
(a) seems simpler to use, but (b) is much more powerful.
Thanks
Andy