You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
file scoped namespaces : nothing controversial here (I hope)
implicit usings in UnitsNet - I'm thinking of System, System.Collections.Generic, System.Numerics (net8+) and our Units namespace
implicit usings in the test projects: same as above + System.Linq and Xunit
adding the JetBrains.Annotations package and annotating the tests with the [TestSubject(..)] annotation (not sure how useful this is in practice, but still better than nothing I guess).
The text was updated successfully, but these errors were encountered:
Everything except JetBrains.Annotations, just go for it. These are internal matters and we can YOLO a bit here.
JetBrains.Annotations I feel is not so much used anymore, it was mostly useful for nullability which is now supported by the framework.
An alternative to TestSubject is simply add xmldoc with <see cref="TheImplementation" /> and you'll have a nice clickable link to the class you're testing.
I'm not 100% sure, but I suspect the AI might be using it (I noticed it was adding it when I use "Generate tests")- I still haven't tried it but my hope is that it would be able to "append" tests to the existing test files (directly using the context menu).
Here's what I'm thinking:
UnitsNet
- I'm thinking ofSystem
,System.Collections.Generic
,System.Numerics
(net8+) and ourUnits
namespaceSystem.Linq
andXunit
JetBrains.Annotations
package and annotating the tests with the[TestSubject(..)]
annotation (not sure how useful this is in practice, but still better than nothing I guess).The text was updated successfully, but these errors were encountered: