public void test_Compartment_setSpatialDimensions1() { int i = C.setSpatialDimensions(2); assertTrue(i == libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE); assertTrue(C.getSpatialDimensions() == 3); }
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_setSpatialDimensions5() { Compartment c = new Compartment(2, 2); int i = c.setSpatialDimensions(2.2); assertTrue(i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE); assertTrue(c.getSpatialDimensions() == 3); c = null; }
public void test_Compartment_setSpatialDimensions4() { Compartment c = new Compartment(2, 2); int i = c.setSpatialDimensions(2.0); assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS); assertTrue(c.getSpatialDimensions() == 2); c = null; }
public void test_L3_Compartment_spatialDimensions() { assertEquals(false, C.isSetSpatialDimensions()); assertEquals(true, isnan(C.getSpatialDimensionsAsDouble())); C.setSpatialDimensions(1.5); assertEquals(true, C.isSetSpatialDimensions()); assertTrue(C.getSpatialDimensionsAsDouble() == 1.5); C.unsetSpatialDimensions(); assertEquals(false, C.isSetSpatialDimensions()); assertEquals(true, isnan(C.getSpatialDimensionsAsDouble())); }
public void test_WriteL3SBML_Compartment_spatialDimensions() { string expected = "<compartment id=\"A\" spatialDimensions=\"2.1\" " + "constant=\"false\"/>"; string expected1 = "<compartment id=\"A\" constant=\"false\"/>"; Compartment c = D.createModel().createCompartment(); c.setId("A"); c.setConstant(false); c.setSpatialDimensions(2.1); assertEquals(true, equals(expected, c.toSBML())); c.unsetSpatialDimensions(); assertEquals(true, equals(expected1, c.toSBML())); }
public void test_SBMLConvert_convertFromL3() { SBMLDocument d = new SBMLDocument(3, 1); Model m = d.createModel(); string sid = "C"; Compartment c = m.createCompartment(); c.setId(sid); c.setSize(1.2); c.setConstant(true); c.setSpatialDimensions(3.4); assertTrue(d.setLevelAndVersion(1, 1, true) == false); assertTrue(d.setLevelAndVersion(1, 2, true) == false); assertTrue(d.setLevelAndVersion(2, 1, true) == false); assertTrue(d.setLevelAndVersion(2, 2, true) == false); assertTrue(d.setLevelAndVersion(2, 3, true) == false); assertTrue(d.setLevelAndVersion(2, 4, true) == false); assertTrue(d.setLevelAndVersion(3, 1, true) == true); }
public void test_Compartment_getSpatialDimensions() { C.setSpatialDimensions(1); assertTrue(C.getSpatialDimensions() == 1); }