R# source template for creating xBehave.net steps

I’m a big fan of R# and xBehave.net. So it was time to mix them up.

I can now write "my step".Step and press TabĀ  and what I get is "my step"._(() => );.
Woohoo!

Here is how you can use a R# source template to create xBehave.net steps.

  1. reference the nuget packageĀ JetBrains.Annotations
  2. add the following class (note the attribute that comes from the reference nuget package)
namespace Your.Namespace
{
    using JetBrains.Annotations;

    public static class Templates
    {
         [SourceTemplate]
         public static void Step(this string description)
         {
            /*$ $description$._(() => $END$); */
         }
    }
}

 

Many thanks to BBV Logo for making this blog post possible.

About the author

Urs Enzler

Add comment

By Urs Enzler

Recent Posts