Answer the question
In order to leave comments, you need to log in
What should unit tests cover?
My question is:
How to correctly write Unit tests? What exactly should they cover?
This is more of a theoretical question than a practical one.
Let's say I have some kind of interface that implies that the class that implements it will write/read to/from storage and perform some data manipulation (for example, wrap it in another interface and return it). For interface tests, I chose to store data in memory. Covered with tests.
EntityInterface:
getDataFieldValue : void
setDataFieldValue : mixed
getScheme : SchemeInterface
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question