InterviewSolution
Saved Bookmarks
| 1. |
Can you use a main() Method for Unit Testing? |
|
Answer» Yes you can test using main() method. One obvious advantage seems to be that you can whitebox test the class. That is, you can test the internals of it (private methods for example). You can't do that with unit-tests. But primarily the test framework tests the interface and the behavior from the user's perspective. |
|