GithubHelp home page GithubHelp logo

isabella232 / resharper-xunit-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jetbrains/resharper-xunit-templates

0.0 0.0 0.0 137 KB

ReSharper Live Templates for xUnit.net

License: Apache License 2.0

resharper-xunit-templates's Introduction

official JetBrains project

ReSharper Live Templates for xUnit.net

This extension adds various Live Templates for xUnit.net to ReSharper.

Check out the README for details on the available templates.

Installation

To install, go to ReSharper → Extension Manager and search for "xunit live templates". Once installed, the templates are automatically available, and can be seen in the . They can be temporarily disabled by unchecking the appropriate entry in the ReSharper → Manage Options dialog.

Contributing

The templates are distributed in a .dotSettings file, which is not designed to be a human-readable file, and is very difficult to work with in an editor. In order to modify or add templates, you can either edit the templates in ReSharper's Live Template editor, or in the markdown files in the templates folder, and running the template "compiler" program to generate the .dotSettings file.

Make sure that any new templates have the appropriate categories and language set.

Editing in ReSharper

  • Add the templates.dotSettings file in the ReSharper → Manage Options dialog. Select "This Computer", click the "plus" add icon and select "Open Settings File". Navigate to templates.dotSettings and select it.
  • Open the Live Templates editor (ReSharper → Tools → Templates Editor)
  • Select the templates.dotSettings file in the Layer drop down in the top left of the editor. This is VERY IMPORTANT. This means any new templates, or edits to the existing templates are saved into the templates.dotSettings file. Without selecting this layer, the changes will be save to the "This Computer" layer.
  • Edit or add new templates. They will be automatically saved, as you update them.

Editing markdown files

All of the templates are saved as markdown files, which makes it convenient to browse and document, as well as edit outside of ReSharper. The markdown files are processed with a small app that will translate between the required .dotSettings format, and the markdown files. Metadata is stored as YAML "front matter".

  • Edit an existing file, or add a new file (use an existing file as a guide). If you are adding a new file, make sure to give the file a new GUID.
  • Save the file, and run rstc compile -i *.md -o templates.dotSettings. The rstc.exe file is in the bin folder.
  • The templates.dotSettings file, as well as the README.md file are updated, ready for commit.

For more details, see the resharper-template-compiler project.

  • In order to update the markdown files after editing the templates.dotSettings file in ReSharper, run rstc decompile templates.dotSettings. It might be necessary to also run rstc compile -i *.md -o foo.dotSettings in order to regenerate README.md.

History

These templates started life in the xunit plugin for ReSharper. Since ReSharper 2016.1, xunit support is built in to ReSharper, meaning the xunit plugin is no longer required. However, it is not appropriate to ship these templates by default, as they will not apply to all users. Hence they are available as a separate extension.

resharper-xunit-templates's People

Contributors

citizenmatt avatar jogge avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.