END_TEST


START_TEST ( test_SpeciesReference_Reactant_parent_create )
{
    Reaction *r = new Reaction(2, 4);
    SpeciesReference *sr = r->createReactant();

    ListOf *lo = r->getListOfReactants();

    fail_unless(lo == r->getReactant(0)->getParentSBMLObject());
    fail_unless(lo == sr->getParentSBMLObject());
    fail_unless(r == lo->getParentSBMLObject());
}
END_TEST


START_TEST ( test_SpeciesReference_Product_parent_create_model )
{
    Model *m = new Model(2, 4);
    Reaction *r = m->createReaction();
    SpeciesReference *sr = m->createProduct();

    ListOf *lo = r->getListOfProducts();

    fail_unless(lo == r->getProduct(0)->getParentSBMLObject());
    fail_unless(lo == sr->getParentSBMLObject());
    fail_unless(r == lo->getParentSBMLObject());
}