If you wish to hide the form, you can use our IgnoreCall() API in your test. This is applicable to void methods only which matches your need.
Isolate.WhenCalled(() => f.show()).IgnoreCall();
Two more tips:
1. Do not forget to add a reference to System.Windows.Forms in your unit test project.
2. In order to verify that the test works, you can use the Verify API (this would be equivalent to \"Assert\" as a part of the AAA structure in unit testing). Syntax below:
Isolate.Verify.WasCalledWithAnyArguments(() => f.Show()); //=False
The test should not pass.
Then, you can try
Isolate.Verify.WasNotCalled(() => f.Show()) //=True
The test should pass now.
Let me know if this helps.