setTimeUnits() public method

public setTimeUnits ( string sid ) : int
sid string
return int
 public void test_Event_setTimeUnits4()
 {
     Event e = new  Event(2,1);
       int i = e.setTimeUnits("");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, e.isSetTimeUnits() );
       e = null;
 }
 public void test_Event_setTimeUnits2()
 {
     string units =  "second";
       Event e = new  Event(2,1);
       int i = e.setTimeUnits(units);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue(( units == e.getTimeUnits() ));
       assertEquals( true, e.isSetTimeUnits() );
       i = e.unsetTimeUnits();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, e.isSetTimeUnits() );
       e = null;
 }
 public void test_Event_setTimeUnits3()
 {
     string units =  "1second";
       Event e = new  Event(2,1);
       int i = e.setTimeUnits(units);
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertEquals( false, e.isSetTimeUnits() );
       i = e.unsetTimeUnits();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, e.isSetTimeUnits() );
       e = null;
 }
Exemplo n.º 4
0
 public void test_Event_setTimeUnits()
 {
     Event E1 = new  Event(2,1);
       string units =  "second";
       E1.setTimeUnits(units);
       assertTrue(( units == E1.getTimeUnits() ));
       assertEquals( true, E1.isSetTimeUnits() );
       if (E1.getTimeUnits() == units);
       {
       }
       E1.setTimeUnits(E1.getTimeUnits());
       assertTrue(( units == E1.getTimeUnits() ));
       E1.setTimeUnits("");
       assertEquals( false, E1.isSetTimeUnits() );
       if (E1.getTimeUnits() != null);
       {
       }
       E1 = null;
 }