public void test_EventAssignment_setVariable2() { string id = "e1"; int i = E.setVariable(id); assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS); assertTrue((id == E.getVariable())); assertEquals(true, E.isSetVariable()); i = E.setVariable(""); assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS); assertEquals(false, E.isSetVariable()); }
public void test_EventAssignment_create() { assertTrue(EA.getTypeCode() == libsbml.SBML_EVENT_ASSIGNMENT); assertTrue(EA.getMetaId() == ""); assertTrue(EA.getNotes() == null); assertTrue(EA.getAnnotation() == null); assertTrue(EA.getVariable() == ""); assertTrue(EA.getMath() == null); }
printEventAssignmentMath(int n, EventAssignment ea) { string variable; string formula; if (ea.isSetMath()) { variable = ea.getVariable(); formula = libsbml.formulaToString(ea.getMath()); Console.Write(" EventAssignment " + n + ", trigger: " + variable + " = " + formula + Environment.NewLine); } }
public void test_EventAssignment_copyConstructor() { EventAssignment o1 = new EventAssignment(2, 4); o1.setVariable("c2"); assertTrue(o1.getVariable() == "c2"); ASTNode node = new ASTNode(libsbml.AST_CONSTANT_PI); o1.setMath(node); node = null; assertTrue(o1.getMath() != null); EventAssignment o2 = new EventAssignment(o1); assertTrue(o2.getVariable() == "c2"); assertTrue(o2.getMath() != null); assertTrue(o2.getParentSBMLObject() == o1.getParentSBMLObject()); o2 = null; o1 = null; }