于是我们的这个类层次变得更加明了:内部变量$_data的处理被替换成受保护的私有方法(private methods)_getData()和_setData()这类方法被转移到被称作记录(Record)的抽象的超级类(super class),当然它是User类下的子类这个记录类...
基于35个网页-相关网页
RESERVED FOR PRIVATE METHODS 私人方法保留
The source code also includes other public and private methods and classes.
源代码还提供了其他公共和私有方法以及类。
This code USES the private methods to retrieve an object from the pool and call the provided delegate.
该代码使用私有方法从池中检索对象,并且调用所提供的委托。
I'll also address some other sticky design questions about TDD, such as if and when to test private methods.
我还将解答其他某些棘手的TDD设计问题,例如是否测试及何时测试私有方法。
应用推荐