loading...

re: Hands of the privates VIEW POST

FULL DISCUSSION
 

Maybe the top bun is a missing abstraction that you can test using its public interface.

class TopBun {
   hasSeedsOnTop(): bool;
   flip(): void;
}

Private interface is a way for you to protect the implementation details from being exposed. When all dependencies to those private methods come from inside the object you'll have the freedom to make changes which don't affect the clients of that object. We want to avoid coupling to small details.

Code of Conduct Report abuse