testfx icon indicating copy to clipboard operation
testfx copied to clipboard

TestMethodIdentifierProperty Namespace is not nullable

Open thomhurst opened this issue 6 months ago • 1 comments

If code is declared in a Global Namespace, Type.Namespace returns null.

Therefore, shouldn't TestMethodIdentifierProperty.Namespace be nullable so it too also distinguishes global namespace?

thomhurst avatar Jun 11 '25 13:06 thomhurst

You can use empty string for this case. We could make it nullable though, I don't have a strong opinion.

Youssef1313 avatar Jun 11 '25 13:06 Youssef1313

IMO absolutely make it nullable. then the compiler forces u to always handle that case. compared to empty string where it is too easy to forget to handle the empty case

SimonCropp avatar Jun 29 '25 07:06 SimonCropp

I am going to close the issue, we can reopen if there is more global interest.

Evangelink avatar Sep 03 '25 07:09 Evangelink