InterviewSolution
Saved Bookmarks
| 1. |
How Do You Test A “protected” Method? |
|
Answer» A PROTECTED method can only be ACCESSED within the same PACKAGE where the class is defined. So, testing a protected method of a target class MEANS we need to define your test class in the same package as the target class. A protected method can only be accessed within the same package where the class is defined. So, testing a protected method of a target class means we need to define your test class in the same package as the target class. |
|