| author | hamidouk |
| Wed, 12 Oct 2011 13:59:38 +0200 | |
| branch | popcorn-port |
| changeset 68 | 5469b2b9743f |
| parent 65 | 6a8cae20f190 |
| child 83 | 1fb63a1a8ac3 |
| permissions | -rw-r--r-- |
| 57 | 1 |
function test_serializer() { |
2 |
module("Serializer basic tests"); |
|
3 |
|
|
|
65
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
4 |
test("init the serializer with a DataLoader and an url", function() { |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
5 |
var dt = new IriSP.DataLoader(); |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
6 |
var ser = new IriSP.Serializer(dt, "http://google.com"); |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
7 |
equal( ser._DataLoader, dt, "The dataloader reference is copied to the object." ); |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
8 |
equal( ser._url, "http://google.com", "The url has been copied as well." ); |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
9 |
}); |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
10 |
|
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
11 |
test("check that the serialize and deserialize abstract functions are defined", function() { |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
12 |
var dt = new IriSP.DataLoader(); |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
13 |
var ser = new IriSP.Serializer(dt); |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
14 |
equal(ser.serialize(), undefined, ".serialize is defined"); |
|
6a8cae20f190
Added new unit tests and changes to the data classes.
hamidouk
parents:
57
diff
changeset
|
15 |
equal(ser.deserialize(), undefined, ".deserialize is defined"); |
| 57 | 16 |
}); |
17 |
||
18 |
}; |