END_TEST


START_TEST (test_Species_setInitialAmount1)
{
  int i = Species_setInitialAmount(C, 2.0);

  fail_unless( i == LIBSBML_OPERATION_SUCCESS );
  fail_unless( Species_getInitialAmount(C) == 2.0 );
  fail_unless( Species_isSetInitialAmount(C));

  i = Species_unsetInitialAmount(C);

  fail_unless( i == LIBSBML_OPERATION_SUCCESS );
  fail_unless( !Species_isSetInitialAmount(C));

}
END_TEST


START_TEST (test_L3_Species_initialAmount)
{
  double initialAmount = 0.2;

  fail_unless( !Species_isSetInitialAmount(S));
  fail_unless( util_isNaN(Species_getInitialAmount(S)));
  
  Species_setInitialAmount(S, initialAmount);

  fail_unless( Species_getInitialAmount(S) == initialAmount );
  fail_unless( Species_isSetInitialAmount(S) );

  Species_unsetInitialAmount(S);

  fail_unless( !Species_isSetInitialAmount(S) );
  fail_unless( util_isNaN(Species_getInitialAmount(S)));
}
END_TEST


START_TEST (test_Species_setInitialAmount2)
{
  Species_t *c = 
    Species_create(2, 2);

  int i = Species_setInitialAmount(c, 4);

  fail_unless( i == LIBSBML_OPERATION_SUCCESS );
  fail_unless( Species_getInitialAmount(c) == 4.0 );
  fail_unless( Species_isSetInitialAmount(c));

  i = Species_unsetInitialAmount(c);

  fail_unless( i == LIBSBML_OPERATION_SUCCESS );
  fail_unless( !Species_isSetInitialAmount(c));

  Species_free(c);
}