How do I use JUnit to test a class that has internal private methods? It seems bad to change the access modifier for a method just to be able to run a test.
Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Showing posts with label private. Show all posts
Showing posts with label private. Show all posts
Friday, May 25, 2012
What"s the proper way to test a class with private methods using JUnit?
Tags
java,
junit,
private,
tdd,
Tips For Programmer,
unit-testing
Monday, February 27, 2012
Why is "Set()” function better than modifying public variable?
This one is bothering me for a while now :)
Hide my app contacts from user
I want to use the contacts API but for my specific application my users will most likely not want these contacts polluting their contact list. The application is targeted for delivery drivers and I want to use Contacts to keep track of past deliveries. I don't really care if the user can edit or change the contacts, but I don't want to confuse the user by having these contacts start populating in their address book.
Subscribe to:
Posts (Atom)