/*
* Test method for 'ca.bpt.cn.model.impl.LinearSynapticIntegrator.getTerminations()'
*/
public void testGetTerminations() throws StructuralException {
ExpandableSynapticIntegrator si = new LinearSynapticIntegrator(1, Units.ACU);
assertEquals(0, si.getTerminations().length);
si.addTermination("test1", new float[]{1f, 1f}, 1f, false);
assertEquals(1, si.getTerminations().length);
assertEquals("test1", si.getTerminations()[0].getName());
assertEquals(2, si.getTerminations()[0].getDimensions());
assertEquals(1f, si.getTerminations()[0].getTau());
si.addTermination("test2", new float[0], 1f, false);
assertEquals(2, si.getTerminations().length);
si.removeTermination("test2");
assertEquals(1, si.getTerminations().length);
try {
si.addTermination("test1", new float[0], 1f, false);
fail("Should have thrown exception due to duplicate termination name");
} catch (StructuralException e) {} //exception is expected
}