I know that Unit Testing is all about testing individual units of code and mocking the other dependencies like database connections, file I/O etc.
I have a few questions on unit tests
- what is that "UNIT" in unit testing that we need to test? Is it a method of a class? or a use-case? Because use-case testing seems more of an integration test to me.
- Mocking external dependencies. Does it mean to mock all references to any external class even if it is same package?