lundi 6 juillet 2015

UnitTesting Fundamentals - What exactly to test?

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

  1. what is that independent unit of test? Is it a method? or a use-case? Because use-case testing seems more of an integration test to me.
  2. Mocking external dependencies. Does it mean to mock all references to any external class even if it is same package?

Aucun commentaire:

Enregistrer un commentaire