TyphoonPatcher is a TyphoonComponentFactoryPostProcessor that allows patching out one or more definitions with another object. More...
Instance Methods | |
(void) | - detach |
(void) | - patchDefinition:withObject: |
This method causes confusion, it only works with a non-activated assembly interface. More... | |
(void) | - patchDefinitionWithKey:withObject: |
(void) | - patchDefinitionWithSelector:withObject: |
TyphoonPatcher is a TyphoonComponentFactoryPostProcessor that allows patching out one or more definitions with another object.
Integration testing - testing a class along with its collaborators and configuration - can be a very useful practice. However, its is sometimes difficult put the system in the required state. Patcher allows taking a fully assembled system, changing just the part required for the given test scenario.
- (void) detach |
- (void) patchDefinition: | (TyphoonDefinition *) | definition | |
withObject: | (TyphoonPatchObjectCreationBlock) | objectCreationBlock | |
This method causes confusion, it only works with a non-activated assembly interface.
Users could (rightly) expect it to work with both. Use the alternative methods: patchDefinitionWithKey: and patchDefinitionWithSelector:
Provided by category TyphoonPatcher(Deprecated).
- (void) patchDefinitionWithKey: | (NSString *) | key | |
withObject: | (TyphoonPatchObjectCreationBlock) | objectCreationBlock | |
- (void) patchDefinitionWithSelector: | (SEL) | definitionSelector | |
withObject: | (TyphoonPatchObjectCreationBlock) | objectCreationBlock | |