0
votes
4answers
134 views

Should each method have a seperate JUnit test class?

I am writing JUnit unit tests for my classes. Is it better to have a separate class for each method, or have just one test class for every actual class?
2
votes
2answers
465 views

Unit testing to prove balanced tree

I've just built a self-balancing tree (red-black) in Java (language should be irrelevant for this question though), and I'm trying to come up with a good means of testing that it's properly balanced. ...
4
votes
2answers
348 views

Looking for a very subtle unit testing example [closed]

In the context of Continuous Integration, I need to teach unit testing to a 20-people audience of programmers. Everything will be all right, but I am still trying to find the perfect unit testing ...
2
votes
5answers
534 views

Unit test cases(JUnit), not by developer but other team members

I have a very interesting situation. Management has strictly asked to do unit testing for the code being developed and divided the task in such a way that few are developing the code and others are ...
2
votes
1answer
457 views

JUnitEE vs JUnit

I know what unit testing is in general and what JUnit is in particular. But here I see that there is a project called JUnitEE which seems to me to be a wrapper over JUnit. So I would like to better ...
8
votes
3answers
961 views

Mocking concrete class - Not recommended

I've just read an excerpt of "Growing Object-Oriented Software" book which explains some reasons why mocking concrete class is not recommended. Here some sample code of a unit-test for the ...
7
votes
3answers
718 views

What elements of my JUnits should I mock?

My classes are following this structure Service Tier (creates and maps InputDTO to DB Data) -> DAO Tier (actually executes DB calls) When I write the service tier JUnits, and when it calls DAO ...