Open rustyswayne opened 6 years ago
I don't know if I buy the argument that test code should be shorter than other code.
I know that you're dealing with DbContext and DbSet classes, so there's a tendency to name the variables the same way, but there's probably an argument to be made that the variable names need improvement. If context
is not descriptive enough, what about databaseContext
? And unless you're dealing with generics, there's probably a more specific name to use, like populationContext
or populationSet
.
Supposing we decide that db
is a word we want to allow as an abbreviation, it looks like there's a way to set up a stylecop.json file with exclusions, which the analyzer should respect. Perhaps we should include a stylecop.json file in our list of shared settings.
But I'm leaning toward expanding db
to database
at this point.
I think hungarian notation should be allowed in tests as, in general, the code is short and readable.
e.x. I've hit this exclusion several times when testing EF with
dbContext
anddbSet
...See #21