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

Allow lower-case field names for generated mocks #17

Closed cmeeren closed 6 years ago

cmeeren commented 7 years ago

According to standard naming rules, the mock field names should start with lowercase. For example, if a dependency has the name IFoobar, the test class field name for that dependency will currently be Foobar, while it should be foobar.

I therefore suggest you facilitate this somehow, e.g. by adding a token $InterfaceMockNameLower$ or simply changing the casing rules for these fields.

RandomEngy commented 6 years ago

Changing any token to camelCase is possible since 1.6.4: https://github.com/Microsoft/UnitTestBoilerplateGenerator/wiki/Custom-Format-Tokens