diff -r 0e6a4d1e4dbe -r 73bce42a3ed3 unittests/mockSerializer.js --- a/unittests/mockSerializer.js Wed Oct 26 17:21:35 2011 +0200 +++ b/unittests/mockSerializer.js Thu Oct 27 11:22:49 2011 +0200 @@ -4,8 +4,22 @@ IriSP.MockSerializer = function(DataLoader, url) { IriSP.Serializer.call(this, DataLoader, url); + this._data = _data; +}; - this._data = { "tags": [ +IriSP.MockSerializer.prototype = new IriSP.Serializer(); + +IriSP.MockSerializer.prototype.currentMedia = function() { + return this._data.medias[0]; +}; + +// Copy some methods from JSONSerializer because we need them in +// some tests. + +IriSP.MockSerializer.prototype.searchAnnotations = IriSP.JSONSerializer.prototype.searchAnnotations; +IriSP.MockSerializer.prototype.searchOccurences = IriSP.JSONSerializer.prototype.searchOccurences; + +var _data = { "tags": [ { "meta": { "dc:contributor": "IRI ", @@ -1458,12 +1472,4 @@ "dc:description": "", "dc:modified": "2010-09-06T15:53:44.699595" } - ] -}; -}; - -IriSP.MockSerializer.prototype = new IriSP.Serializer(); - -IriSP.MockSerializer.prototype.currentMedia = function() { - return this._data.medias[0]; -}; + ]}; \ No newline at end of file