that any method of an object should call only methods belonging to: @interface Demeter : NSObject{ @private A *a; } - (void) example: (B *) b; @end @implementation Demeter - (NSUInteger)func { ... } - (void)example:(B *)b { C *c; [self func]; [b invert]; a = [[A alloc] init]; a.active = YES; [c print]; } @end itself any parameters that were passed in to the method
that any method of an object should call only methods belonging to: @interface Demeter : NSObject{ @private A *a; } - (void) example: (B *) b; @end @implementation Demeter - (NSUInteger)func { ... } - (void)example:(B *)b { C *c; [self func]; [b invert]; a = [[A alloc] init]; a.active = YES; [c print]; } @end itself any parameters that were passed in to the method any object it created
that any method of an object should call only methods belonging to: @interface Demeter : NSObject{ @private A *a; } - (void) example: (B *) b; @end @implementation Demeter - (NSUInteger)func { ... } - (void)example:(B *)b { C *c; [self func]; [b invert]; a = [[A alloc] init]; a.active = YES; [c print]; } @end itself any parameters that were passed in to the method any directly held component objects any object it created
a spec •Make a mess •It’s just a Stub. • provides canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test.