public isVariantOfSubstancePerTime ( ) : bool | ||
Résultat | bool |
public void test_UnitDefinition_isVariantOfSubstancePerTime_4() { UnitDefinition ud = new UnitDefinition(2,2); Unit dim = ud.createUnit(); dim.setKind(libsbml.UnitKind_forName("dimensionless")); Unit perTime = ud.createUnit(); perTime.setKind(libsbml.UnitKind_forName("second")); perTime.setExponent(-1); Unit u = ud.createUnit(); assertEquals( false, ud.isVariantOfSubstancePerTime() ); u.setKind(libsbml.UNIT_KIND_KILOGRAM); u.setExponent(1); assertEquals( true, ud.isVariantOfSubstancePerTime() ); u.setScale(-1); perTime.setScale(-1); assertEquals( true, ud.isVariantOfSubstancePerTime() ); u.setMultiplier(2); assertEquals( true, ud.isVariantOfSubstancePerTime() ); u.setOffset(3); assertEquals( true, ud.isVariantOfSubstancePerTime() ); u.setExponent(-3); assertEquals( false, ud.isVariantOfSubstancePerTime() ); u.setExponent(1); perTime.setExponent(-3); assertEquals( false, ud.isVariantOfSubstancePerTime() ); perTime.setExponent(-1); ud.addUnit(dim); assertEquals( true, ud.isVariantOfSubstancePerTime() ); ud = null; }