April 2015
Intermediate to advanced
264 pages
5h 31m
English
Having looked at the Rule and Stock classes, let us now turn our attention to the Event class. The Event class is very simple: receivers can register with the event to be notified when the event occurs. When the event fires, all the receivers are notified of the event.
A more detailed description is as follows:
connect method, which takes a method or function to be called when the event firesfire method is called, all the registered callbacks are called with the same parameters that are passed to the fire methodWriting tests for the connect method is fairly straightforward—we just need to check that the receivers are being stored properly. But, how do we write the tests ...
Read now
Unlock full access