Skip to content

A Visual Studio extension that adds menu commands to convert a class or method name to and from a BDD-style sentence.

License

Notifications You must be signed in to change notification settings

jrockwood/MakeBddName

Repository files navigation

Make BDD Name

Build status

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.

Features

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.

Make BDD Name menu Make BDD Name 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)

Options Page

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.

Prerequisites

In order to use this extension you must have Visual Studio 2017 or Visual Studio 2019 installed.

Contribute

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.

License

Apache 2.0

About

A Visual Studio extension that adds menu commands to convert a class or method name to and from a BDD-style sentence.

Resources

License

Stars

Watchers

Forks

Packages

No packages published