Is there a way to specify in an .editorconfig
file that I want to use a different naming style for my Unit tests?
Currently we're using something like this: GetAll_GivenNoCustomers_ReturnsEmptyList
but I get the suggestion to remove the underscores from the name: GetAllGivenNoCustomersReturnsEmptyList
and the dotnet format
command actually changes this.
For all our other methods this behavior is desired, just not for our tests.
Is there a way to treat our unit tests differently?
Like a way to sense the presence of the [Test]
attributes before the method definition?
Or (less preferred) exclude our test projects from this naming rule?
I would like to keep all rules in one single .editorconfig
file, which we would like to distribute across different applications and users in our environment.