microsoft / UnitTestBoilerplateGenerator

An extension for Visual Studio that generates a unit test boilerplate from a given class, setting up mocks for all dependencies. Supports NUnit, Visual Studio Test, Moq and SimpleStubs.
MIT License
158 stars 51 forks source link

Cannot add to existing test #22

Closed generik0 closed 6 years ago

generik0 commented 6 years ago

Installed product versions

Description

i do not seam to be able to add to an existing test. I.e. a new test method. from the termplate. Kan the extension not adding tests to existing unit test classes though automation?

Steps to recreate

  1. Have a test class created.
  2. Then try to add/update to existing ctest class

Expected behavior

I would like to be able to add a test on top of existing tests with new methods in a class

RandomEngy commented 6 years ago

What are you envisioning here? Why not just copy/paste an existing test case to make a new one? I think it would be easier to do that then navigate back to the original file to run the boilerplate generator again. All you would need to change is the name of the test.

generik0 commented 6 years ago

You are right. Except for when a interface of two where added to the class constructor :-/

RandomEngy commented 6 years ago

Yes, that scenario is different, and would be useful. It would be a bit harder given the use of custom templates to make the initial class. There would have to be a lot more logic to dig into the existing code and modify it. It's on the backlog though; just not for the initial release.

generik0 commented 6 years ago

Fair enough