Replies: 1 comment
-
In short: I do like it. I often times see folks anyway using the testcontext like this: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are types in bUnit that conflicts with types in other testing libraries that might be used together with bUnit.
One such example is
TestContext
, that has a similar named counterpart in NUnit and MSTest. My idea would be to rename it to avoid this, e.g. by prefixing it with bUnit.Others I would rename to make them more easily discoverable, like
FakeNavigationManager
could be namedBunitNavigationManager
, and similar changes could be made to the other test doubles.However, there are other types such as
IRenderedComponent
that I don't want to rename, and maybe that will look inconsistent.Perhaps a rule of thumb can be, that if there exists a Blazor type, e.g.
RemoteNavigationManager
orBrowserRenderer
, then bUnit's version will haveBunit
as the prefix, to indicate the "environment". And similarly, if other types exists commonly in the testing ecosystem, then we also prefix, but leave the other types that are specific to bUnit, untouched.At the same time, it would be ideal if v2 is more or less a drop-in replacement, and with too many types renamed, thats not going to be the case. I am leaning towards it actually being worth it, since for most users it would be a simple search/replace in their code base.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions