Martin Platt posted about when not to use Generate Test in VS – when your code doesn’t work.
I’m not that fanatic saying don’t use this feature at all, but I agree with the supposition – the code generator is not that smart. It doesn’t assume ANYTHING about your code. Make sure you write a test that:
- Makes sense
- Readable
- Maintainable
- Passes
If this tool (or any other tool, for that matter) doesn’t help you to create a test with these traits – don’t use it.