angular.module('fbMocks') .factory('notifyService', ['$q', function ($q: ng.IQService): fb.IMockNotifyService { var mockBase = new fb.MockBase($q); var resolve = function (type: fb.RequestType, identifier: string, returnValue: any): void { mockBase.resolve(mockBase.requestIdentifier(type, identifier), returnValue); }; var reject = function (type: fb.RequestType, identifier: string, returnValue: any): void { mockBase.reject(mockBase.requestIdentifier(type, identifier), returnValue); }; var getPendingRequests = function (): string[] { return mockBase.getPendingRequests(); }; var notifications = []; var addNotification = function (notifiering: fb.INotification) { notifications.push(notifiering); } return { notifications: notifications, addNotification: addNotification, resolve: resolve, reject: reject, getPendingRequests: getPendingRequests }; }]);