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

"Could not find class declaration" exception thrown when generating boiletplate #44

Closed ghost closed 5 years ago

ghost commented 5 years ago

Installed product versions

Description

Exception is thrown when creating unit test boilerplate.

Current behavior

Creating a unit test boilerplate throws exception that says it could not find class declaration.

image

Expected behavior

It should create a unit test boilerplate.

Notes

It might help investigating that my project name starts with digits: image But namespaces start with ordinary letters.

RandomEngy commented 5 years ago

Can you also post the contents of the file you were trying to make the test for?

ghost commented 5 years ago

Sorry, should've closed it earlier. As you can see in the last picture I attached, I have project names starting with number. The moment I've renamed the project to start with a letter instead, it worked.