I read test regularly to understand the desired/specified behavior of the SUT. With Verify it is no longer possible to read the test code top to bottom to understand that behavior because the expectation of the assert part of the test is "hidden" in another file somewhere in the project - the .verified file.
I think it should be as simple as possible to navigate from the test code to the corresponding .verfied file, even if the test currently passes.
I know that there is a "Open Verified" context menu entry but that's just in the test session view. But my reading context usually is the actual test C# file. So there is some extra lookup work that needs to be done to get from the code to the test session tree item.
It would be nice if I could have the "Open Verfied" in the context menu right in the editor gutter, either at the test icon:
or at the Verify call:
Sometime (for example in the case of Verify.SourceGenerators) one test generates multiple files, I am not sure what should happen in that case, maybe it should give me a selection list when I summon "Open Verfied".
On a related note:
For me the "Open Verfied" entry in the context menu in the test session view is always disabled. I have never seen it enabled, that might be bug.
I read test regularly to understand the desired/specified behavior of the SUT. With Verify it is no longer possible to read the test code top to bottom to understand that behavior because the expectation of the assert part of the test is "hidden" in another file somewhere in the project - the
.verifiedfile.I think it should be as simple as possible to navigate from the test code to the corresponding
.verfiedfile, even if the test currently passes.I know that there is a "Open Verified" context menu entry but that's just in the test session view. But my reading context usually is the actual test C# file. So there is some extra lookup work that needs to be done to get from the code to the test session tree item.
It would be nice if I could have the "Open Verfied" in the context menu right in the editor gutter, either at the test icon:
or at the
Verifycall:Sometime (for example in the case of Verify.SourceGenerators) one test generates multiple files, I am not sure what should happen in that case, maybe it should give me a selection list when I summon "Open Verfied".
On a related note:
For me the "Open Verfied" entry in the context menu in the test session view is always disabled. I have never seen it enabled, that might be bug.