21
votes
5answers
1k views

Do unit tests sometimes break encapsulation? [duplicate]

I very often hear the following: "If you want to test private methods, you'd better put that in another class and expose it." While sometimes that's the case and we have a hiding concept inside our ...
7
votes
4answers
514 views

Do some best practices depend on skill?

Is there evidence that some software development best practices depend on programming skill level? I mean, these methods are good, but maybe the way the are used or the extent might vary? This ...
3
votes
4answers
613 views

When, Where, and How to Unit Test [duplicate]

I'm very familiar with xUnit frameworks and I try to implement unit tests on every project I start. Somewhere along the way, I realize that I'm writing the same tests over and over again, and then I ...
3
votes
1answer
358 views

Teaching Programming: drawbacks of using unit tests in problem statement for assignments?

I am experimenting with marking assignments for a programming course using unit tests. Is it likely to harm the learning process if I publish some of the tests I use as part of the problem statement? ...