Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pagade
on March 10, 2022
|
parent
|
context
|
favorite
| on:
Still no consensus on testing private methods
One alternative/compromise not mentioned is to make the method 'protected'. This is usually a reasonable compromise in languages like Java. The test can access such method since it follow the same package hierarchy as the src.
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: