public void test_Compartment_setName1() { int i = C.setName("cell"); assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS); assertEquals(true, C.isSetName()); i = C.unsetName(); assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS); assertEquals(false, C.isSetName()); }
protected override void Because() { var model = new Model(3, 1); model.setName("TestModel"); model.setNotes("TestNotes"); model.setMetaId("TestMetaId"); sut.CreateEventsTopContainer(); sut.CreateTopContainer(model); var compartment = new Compartment(3, 1); compartment.setName("Compartment"); compartment.setId("c1"); compartment.setSpatialDimensions(1); compartment.setSize(5); var compartment2 = new Compartment(3, 1); compartment2.setName("Compartment"); compartment2.setId("c2"); compartment2.setSpatialDimensions(2); compartment2.setSize(5); var compartment3 = new Compartment(3, 1); compartment3.setName("Compartment"); compartment3.setId("c3"); compartment3.setSpatialDimensions(3); compartment3.setSize(5); _container = sut.CreateContainerFromCompartment(compartment); _container2 = sut.CreateContainerFromCompartment(compartment2); _container3 = sut.CreateContainerFromCompartment(compartment3); sut.CreateSpatialStructureFromModel(sut._topContainer, model); }
public void test_Compartment_setName2() { Compartment c = new Compartment(1, 2); int i = c.setName("1cell"); assertTrue(i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE); assertEquals(false, c.isSetName()); i = c.unsetName(); assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS); assertEquals(false, c.isSetName()); c = null; }
public void test_Compartment_setName() { string name = "My_Favorite_Factory"; C.setName(name); assertTrue((name == C.getName())); assertEquals(true, C.isSetName()); if (C.getName() == name) { ; } { } C.setName(C.getName()); assertTrue((name == C.getName())); C.setName(""); assertEquals(false, C.isSetName()); if (C.getName() != null) { ; } { } }
public static void Main(string[] args) { Model model = new Model(3, 1); Compartment compartment = new Compartment(3, 1); compartment.setId("cheese"); compartment.setName("french-cheese"); model.addCompartment(compartment); Species species = new Species(3, 1); species.setId("salmonella"); species.setName("german-salmonella"); model.addSpecies(species); SBMLDocument doc = new SBMLDocument(3, 1); doc.setModel(model); Console.Write(new SBMLWriter().writeSBMLToString(doc)); }