| author | hamidouk |
| Thu, 03 Nov 2011 16:05:52 +0100 | |
| branch | popcorn-port |
| changeset 185 | 2ccec6201261 |
| parent 83 | 1fb63a1a8ac3 |
| permissions | -rw-r--r-- |
| 57 | 1 |
function test_serializer() { |
| 83 | 2 |
module("Serializer basic tests", {setup: function() { |
3 |
this.dt = new IriSP.DataLoader(); |
|
4 |
this.ser = new IriSP.Serializer(this.dt, "http://google.com"); |
|
5 |
}}); |
|
| 57 | 6 |
|
|
65
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
7 |
test("init the serializer with a DataLoader and an url", function() { |
| 83 | 8 |
|
9 |
equal( this.ser._DataLoader, this.dt, "The dataloader reference is copied to the object." ); |
|
| 185 | 10 |
equal( this.ser._url, "http://google.com", "The url has been copied as well." ); |
11 |
deepEqual( this.ser._data, [], "The serializer data is not defined." ); |
|
|
65
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
12 |
}); |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
13 |
|
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
14 |
test("check that the serialize and deserialize abstract functions are defined", function() { |
| 83 | 15 |
notEqual(this.ser.serialize, undefined, ".serialize is defined"); |
16 |
notEqual(this.ser.deserialize, undefined, ".deserialize is defined"); |
|
17 |
}); |
|
18 |
|
|
19 |
test("check if currentMedia() is defined", function() { |
|
20 |
|
|
| 57 | 21 |
}); |
22 |
||
23 |
}; |