Class Tests
In: test.rb
Parent: Object

The class cointaining the tests and all the needed functionality to run the run the tests sequentially.

Tests are sorted alphanumerically and run. No tests should depend on the outcome of previous tests. There are some exceptions tho: The three first tests clean up the database and create overall structure and class tables

Methods
assert    assert_nothing_raised    new    setup    test_00_clean_sweep    test_01_create_database    test_02_create_serializable    test_03_insert    test_04_update    test_05_store    test_06_store_existing    test_07_delete    test_08_duplicate_elimination    test_09_garbage_collection    test_10_delete_referred   
Attributes
assertions  [RW] 
dbi  [RW] 
Public Class methods
new()
Public Instance methods
setup()

clean up the database before every test and initialize a clean TestSerializable and assertion array.

assert_nothing_raised() {|| ...}

assertion fails if an exception was raised

assert(assertion, msg)

fail with msg if assertion is false

test_00_clean_sweep()

clean up the database

test_01_create_database()

initialize the database with the tables for basic datatypes and tables that contain metadata.

test_02_create_serializable()

create the TestSerializable and SubSerializable tables

test_03_insert()

reconnect to database and enable transactions

then insert a TestSerializable object

test_04_update()

insert an object and update it

test_05_store()

use store to insert an object

test_06_store_existing()

use store to update an object

test_07_delete()

delete an object

test_08_duplicate_elimination()

insert two objects and check that shared subobjects are only present once

test_09_garbage_collection()

check that objects that should not get deleted won’t be

test_10_delete_referred()

check that the API will complain if we try to delete objects that are needed by other objects