Download the extension at the VS Gallery or get the nightly build
Do you like to use a Jasmine/BDD style of naming your C#/VB test methods? Are
you tired of typing an underscore between words? Then this extension is for you!
Simply type your sentence in quotes using spaces, punctuation, or whatever else
you want, then hit Ctrl+', Ctrl+'
to convert the sentence to a C#-compatible
method or class name.
See the changelog for updates and roadmap.
Easily type a BDD-style sentence in quotes for a class or method name, and then
hit Ctrl+', Ctrl+'
or select "Make BDD Name" from the shortcut menu.
Watch a video of the usage here.
Specify what format you want your BDD sentences in from Tools/Options.
- Underscores and preserve case ("should Do something" -->
should_Do_something
) - Underscores and sentence case ("should Do something" -->
Should_do_something
) - PascalCase ("should Do something" -->
ShouldDoSomething
)
You can convert to and from existing names. For example, if you have an existing
method named ShouldDoSomething
and your options specify "Underscores and
sentence case", then invoking the command with your selection somewhere within
the method name will convert the method to Should_do_something
.
In order to use this extension you must have Visual Studio 2017 or Visual Studio 2019 installed.
Check out the contribution guidelines if you want to contribute to this project.
For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.