在单元测试中,它与实际用例相同或更小,因为单元服从于“单一职责原则”,您是测试它的单一职责。
In a unit test, it's the same but smaller — because your unit obeys the single responsibility Principle, you're testing its single responsibility.
所有组件、服务和其它符号都要遵循单一职责原则。这会使应用程序更干净,易于阅读和维护,提高可测试性。
Apply the Single Responsibility Principle to all components, services, and other symbols. This helps make the app cleaner, easier to read and maintain, and more testable.
第十章主要讲述了单一职责原则(SRP),这个原则在Martin的另一本书《敏捷软件开发:原则,模式与实践》中也曾讨论过。
Chapter 10 focuses heavily on The Single Responsibility Principle (SRP), a concept from Martin's previous work, Agile Software Development: Principles, Patterns, and Practices.
第十章主要讲述了单一职责原则(SRP),这个原则在Martin的另一本书《敏捷软件开发:原则,模式与实践》中也曾讨论过。
Chapter 10 focuses heavily on The Single Responsibility Principle (SRP), a concept from Martin's previous work, Agile Software Development: Principles, Patterns, and Practices.
应用推荐