unittests/tests/serializer.js
branchpopcorn-port
changeset 65 6a8cae20f190
parent 57 eabfc9a2eb35
child 83 1fb63a1a8ac3
equal deleted inserted replaced
64:b13359f9ce48 65:6a8cae20f190
     1 function test_serializer() {
     1 function test_serializer() {
     2   module("Serializer basic tests");
     2   module("Serializer basic tests");
     3   
     3   
     4   test("a basic test example", function() {
     4   test("init the serializer with a DataLoader and an url", function() {
     5       ok( true, "this test is fine" );
     5       var dt = new IriSP.DataLoader();
     6       var value = "hello";
     6       var ser = new IriSP.Serializer(dt, "http://google.com");
     7       equal( value, "hello", "We expect value to be hello" );
     7       equal( ser._DataLoader, dt, "The dataloader reference is copied to the object." );
       
     8       equal( ser._url, "http://google.com", "The url has been copied as well." );
       
     9   });
       
    10   
       
    11   test("check that the serialize and deserialize abstract functions are defined", function() {
       
    12       var dt = new IriSP.DataLoader();
       
    13       var ser = new IriSP.Serializer(dt);
       
    14       equal(ser.serialize(), undefined, ".serialize is defined");
       
    15       equal(ser.deserialize(), undefined, ".deserialize is defined");
     8   });
    16   });
     9 
    17 
    10 };
    18 };