*/
@Test public void testRegister3() {
Reaction r2 = new Reaction(2,4);
r2.setId("R2");
KineticLaw k = r2.createKineticLaw();
k.createLocalParameter("LP1");
// We should not be allowed to register an other local parameter with the same id
try {
k.createLocalParameter("LP1");
// fail("We should not be able to add a local parameter with the same id as an other local parameter in the same kineticLaw.");
} catch (IdentifierException e) {
// success
} catch (IllegalArgumentException e) {
// success (this the exception returned often, IdentifierException would be better)
}
assertTrue(k.getLocalParameterCount() == 1);
try {
model.addReaction(r2);
} catch (IllegalArgumentException e) {
// failure