December 2015
Intermediate to advanced
240 pages
4h 57m
English
We will see how we can use TDD to implement the observer pattern. We will use the red, green, and refactor life cycle of TDD to understand it in more detail.
Let's try to add code, which has some dependency. Don't include dependency in the first step and see what error it's giving. Normally in the red step, we have some code with error, and then in next step we add proper code to make it green.
<script type="text/javascript"> Object.defineProperty(employee.status, 'Active', { get: function () { return inactive; }, set: function (status) { Object.getNotifier(this).notify({ type: 'update', name: 'Inactive', oldValue: inactive }); // Let's also print the value in logger anytime it ...Read now
Unlock full access