Thanks for your helpful clarifications in the past.
I now have some additional questions - clarifications regarding formal definitions.
Current mainstream definition
In the book Unit Testing (https://freecontent.manning.com/what-is-a-unit-test-part-2-classical-vs-london-schools/
), the distinction regarding the definition of a unit was as follows:
- London school --> Unit is "A class."
- Classical school --> Unit is a "A class or a set of classes."
London school - Original definitions
Going back to the original GOOS book I found these quotes when searching for cluster & composite:
- Chapter 5 "Unit tests... exercise objects, or small clusters of objects"
- Chapter 6: "Internals v. Peers. we must decide what is inside and outside each object... Much of the point of an object... is to encapsulate access to its internals through its API" and "An object communicates with other objects in the system by sending and receiving messages... the objects it communicates with directly are its peers"... also "The composite object's API must hide the existence of its component parts and the interactions between them, and expose a simpler abstraction to its peers."
Based on the above, this leads me to the following conclusion (by the original definition in GOOS) that, in the London school.
- In many places on the internet (and books) the statement is that the
class (object) is the unit in London school
- But based on the actual definitions in GOOS, the composite class (composite object) is the unit
This composite class may consist of just one class or it might consist of a cluster of classes. So the word Internals is referring to those internal classes which are inside the cluster, but not exposed externally.
I'm interested to hear your thoughts about this interpretation, i.e. if it's correct statement of the interpretation from the GOOS book.
Thanks in advance,
P.S. Also thanks to Joseph too for providing useful insights today regarding mocks.