All Questions
2 questions
4
votes
2
answers
3k
views
Unit Test : Do I need to make an unit test for each class in my project
I have recently tried to to implement unit tests on a Java Web Application my project is built on MVC design architecture and uses Spring & JPA Hibernate and JSF here is a package tree
-src
-...
3
votes
2
answers
11k
views
Unit testing / How to validate private fields of a newly created object?
I have a basic unit test (for the sample) that involves this code:
void testShouldCreateACar() {
Car car = someone.createFerrari();
assertTrue(car.name == "Ferrari"); // can't access name since ...