setBoundaryCondition() public method

public setBoundaryCondition ( bool value ) : int
value bool
return int
Beispiel #1
0
 public void test_L3_Species_hasRequiredAttributes()
 {
     Species s = new  Species(3,1);
       assertEquals( false, s.hasRequiredAttributes() );
       s.setId( "id");
       assertEquals( false, s.hasRequiredAttributes() );
       s.setCompartment( "cell");
       assertEquals( false, s.hasRequiredAttributes() );
       s.setHasOnlySubstanceUnits(false);
       assertEquals( false, s.hasRequiredAttributes() );
       s.setBoundaryCondition(false);
       assertEquals( false, s.hasRequiredAttributes() );
       s.setConstant(false);
       assertEquals( true, s.hasRequiredAttributes() );
       s = null;
 }
Beispiel #2
0
 public void test_Model_getNumSpeciesWithBoundaryCondition()
 {
     Species s1 = new  Species(2,4);
       Species s2 = new  Species(2,4);
       Species s3 = new  Species(2,4);
       s1.setId( "s1");
       s2.setId( "s2");
       s3.setId( "s3");
       s1.setCompartment( "c1");
       s2.setCompartment( "c2");
       s3.setCompartment( "c3");
       s1.setBoundaryCondition(true);
       s2.setBoundaryCondition(false);
       s3.setBoundaryCondition(true);
       assertTrue( M.getNumSpecies() == 0 );
       assertTrue( M.getNumSpeciesWithBoundaryCondition() == 0 );
       M.addSpecies(s1);
       assertTrue( M.getNumSpecies() == 1 );
       assertTrue( M.getNumSpeciesWithBoundaryCondition() == 1 );
       M.addSpecies(s2);
       assertTrue( M.getNumSpecies() == 2 );
       assertTrue( M.getNumSpeciesWithBoundaryCondition() == 1 );
       M.addSpecies(s3);
       assertTrue( M.getNumSpecies() == 3 );
       assertTrue( M.getNumSpeciesWithBoundaryCondition() == 2 );
 }