When using SpecFlow’s dialog to generate step definition skeletons, the default style is “Regular expressions in attributes”:
That produces results like this:
That looks very messy to me. The regular expression text can be read easily, but then the PascalCase method underneath looks like it is too much. I see redudant code. I see dead code. 🙂
I personally like the “Method name – underscores” style better:
That looks a lot cleaner to me. Yes, I am a little biased after having spent several years in Ruby-land, but hey, I had adopted this style in C# before that. While this is not a common format for method names in C#, I don’t really care, as nobody should be calling this methods in the common way anyway, so I rather follow a style that makes the code read better, without junk around that doesn’t add anything to my understanding of the code.
Note: by the way, I do rename those p0 and P0 references!!