Package org.sbml.jsbml

Examples of org.sbml.jsbml.CompartmentType


    assertTrue(M.getCompartment(0).equals(c)); // TODO: check why this is failing
  }

  @Test
  public void test_Model_createCompartmentType() {
    CompartmentType c = M.createCompartmentType();
    assertTrue(c != null);
    assertTrue(M.getCompartmentTypeCount() == 1);
    assertEquals(M.getCompartmentType(0), c);
  }
View Full Code Here


    o3 = null;
  }

  @Test
  public void test_Model_removeCompartmentType() {
    CompartmentType o1, o2, o3;
    o1 = M.createCompartmentType();
    o2 = M.createCompartmentType();
    o3 = M.createCompartmentType();
    o3.setId("test");
    assertTrue(M.removeCompartmentType(0).equals(o1));
View Full Code Here

  private void setCompartmentCompartmentType(Compartment compartment,
      Model model) {
    if (compartment.isSetCompartmentType()) {
      String compartmentTypeID = compartment.getCompartmentType();

      CompartmentType compartmentType = model
          .getCompartmentType(compartmentTypeID);

      if (compartmentType != null) {
        compartment.setCompartmentType(compartmentType);
      } else {
View Full Code Here

  /**
   * Test method for {@link org.sbml.jsbml.Model#removeCompartmentType(java.lang.String)}.
   */
  @Test
  public void testRemoveCompartmentTypeString() {
    CompartmentType ct = modelL2V4.createCompartmentType("ct");
    assertTrue(modelL2V4.getCompartmentType(ct.getId()) != null);
   
    modelL2V4.removeCompartmentType(ct.getId());
    assertTrue(modelL2V4.getCompartmentType(ct.getId()) == null);
  }
View Full Code Here

              return event;
            } else if (elementName.equals("compartmentType")
                && list.getSBaseListType().equals(
                    ListOf.Type.listOfCompartmentTypes)
                && (model.getLevel() == 2 && model.getVersion() > 1)) {
              CompartmentType compartmentType = (CompartmentType) newContextObject;
              model.addCompartmentType(compartmentType);

              return compartmentType;
            } else if (elementName.equals("speciesType")
                && list.getSBaseListType().equals(
View Full Code Here

    assertTrue(M.getCompartment(0).equals(c)); // TODO : check why this is failing
  }

  @Test
  public void test_Model_createCompartmentType() {
    CompartmentType c = M.createCompartmentType();
    assertTrue(c != null);
    assertTrue(M.getNumCompartmentTypes() == 1);
    assertEquals(M.getCompartmentType(0), c);
  }
View Full Code Here

    o3 = null;
  }

  @Test
  public void test_Model_removeCompartmentType() {
    CompartmentType o1, o2, o3;
    o1 = M.createCompartmentType();
    o2 = M.createCompartmentType();
    o3 = M.createCompartmentType();
    o3.setId("test");
    assertTrue(M.removeCompartmentType(0).equals(o1));
View Full Code Here

  private void setCompartmentCompartmentType(Compartment compartment,
      Model model) {
    if (compartment.isSetCompartmentType()) {
      String compartmentTypeID = compartment.getCompartmentType();

      CompartmentType compartmentType = model
          .getCompartmentType(compartmentTypeID);

      if (compartmentType != null) {
        compartment.setCompartmentType(compartmentType);
      } else {
View Full Code Here

    assertTrue(M.getCompartment(0).equals(c)); // TODO : check why this is failing
  }

  @Test
  public void test_Model_createCompartmentType() {
    CompartmentType c = M.createCompartmentType();
    assertTrue(c != null);
    assertTrue(M.getNumCompartmentTypes() == 1);
    assertEquals(M.getCompartmentType(0), c);
  }
View Full Code Here

    o3 = null;
  }

  @Test
  public void test_Model_removeCompartmentType() {
    CompartmentType o1, o2, o3;
    o1 = M.createCompartmentType();
    o2 = M.createCompartmentType();
    o3 = M.createCompartmentType();
    o3.setId("test");
    assertTrue(M.removeCompartmentType(0).equals(o1));
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.CompartmentType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.