Tests-SystemChangeNotification

ChangeHooksTest
This class implements unit tests to verify that when the system changes, notification messages are sent around correctly.
Therefore the test messages make a system change, after registering to receive an event ater the change occured. In this event (sent immediately after the change), the actual assertions take place.
Note that the system changes are *really* made to the system, but in a change set that is created in the setUp method, while the previous one is restored in the tearDown method.
addSingleEvent:
checkEvent:kind:item:itemKind:
checkForOnlySingleEvent
classCommentedEvent:
classCreationEvent:
classRecategorizedEvent:
classRedefinitionEvent:
classRemovalEvent:
This event used to be sent efter the class was removed.
This was changed, and therefore this test is useless currently.
classRenameEvent:
classSuperChangedEvent:
commentStringForTesting
generateTestClass
generateTestClassX
generatedTestClassName
generatedTestClassNameX
instanceVariableCreationEvent:
instanceVariableRemovedEvent:
methodCreationEvent1:
methodCreationEvent2:
methodDoItEvent1:
methodRecategorizationEvent:
methodRemovedEvent1:
methodRemovedEvent2:
newlyCreatedClassName
rememberEvent:
removeGeneratedTestClasses
Remove all classes that were possibly generated during testing.
renamedTestClassName
setUp
shouldNotBeCalledEvent:
This event should not be called, so fail the test.
tearDown
testClassCommentedEvent
testClassCreationEvent
testClassRecategorizedEvent1
testClassRecategorizedEvent2
testClassRedefinition
testClassRemovalEvent
This event used to be sent efter the class was removed.
This was changed, and therefore this test is useless currently.
testClassRenamedEvent
testClassSuperChangedEvent
testDoItEvent1
testDoItEvent2
testInstanceVariableCreationEvent1
testInstanceVariableCreationEvent2
testInstanceVariableRemovedEvent1
testInstanceVariableRemovedEvent2
testInstanceVariableRenamedSilently
testMethodCreationEvent1
testMethodCreationEvent2
testMethodRecategorizationEvent
testMethodRemovedEvent1
testMethodRemovedEvent2
SystemChangeErrorHandling
This class tests the error handing of the notification mechanism to ensure that one client that receives a system change cannot lock up the complete system."
handleEventWithError:
handleEventWithHalt:
setUp
storeEvent1:
storeEvent2:
storeEvent3:
tearDown
testErrorOperation
testHaltOperation
testUnhandledEventOperation
SystemChangeErrorHandlingTest
A SystemChangeErrorHandlingTest is xxxxxxxxx.
Instance Variables
capturedEvents: <Object>
capturedEvents
- xxxxx
SystemChangeNotifierTest
A SystemChangeNotifierTest is a test class that tests whether the triggering of changes indeed results in the intended changes to be sent to registered object. The basic mechanism for each test is fairly simple:
- register the receiver as the one to get the change notifier.
- manually trigger a change (so the system is not polluted just to see whether we get the needed event).
- the method #event: is invoked and remembers the change event.
- the change event is checked to see whether it was the intended one.
Instance Variables
capturedEvent: Remembers the captured event
capturedEvent:
Remember the event being sent.
checkEventForClass:category:change:
checkEventForMethod:protocol:change:
checkEventForMethod:protocol:change:oldMethod:
event:
The notification message being sent to me when an event is captured. Remember it.
setUp
systemChangeNotifier
The notifier to use. Do not use the one in the system so that the fake events triggered in the tests perturb clients of the system's change notifier (e.g. the changes file then shows fake entries).
tearDown
testClassAddedEvent
testClassAddedEvent2
testClassCommentedEvent
testClassRecategorizedEvent
testClassRemovedEvent
testClassRenamedEvent
self run: #testClassRenamedEvent
testDoItEvent
testMethodAddedEvent1
testMethodAddedEvent2
testMethodAddedEvent3
testMethodRemovedEvent
SystemChangeTestRoot
The Root test class for the System Change Notification tests.
systemChangeNotifier
The notifier to use. Use the one for the system.
tearDown
unhook