This question already has an answer here:
- assert vs. JUnit Assertions [closed] 7 answers
When testing the over all functionality of a class, when should Java's built in assert
be used instead of JUnit and vice-versa? It's been my observation that JUnit adds unnescary complexity if you're not using anything but it's assertEquals
but I'm fairly new to testing in general. Also I heard having the assert
in the source code adds to readability and understanding.
Is that a problem that I only test the over all functionality and not the individual functions (because if over all it works it implies the individual pieces do too)?
Aucun commentaire:
Enregistrer un commentaire