/*
* Test method for 'ca.nengo.model.impl.FunctionInput.getDimensions()'
*/
public void testGetDimensions() throws StructuralException {
FunctionInput input = new FunctionInput("test", new Function[]{new ConstantFunction(1, 1f)}, Units.UNK);
assertEquals(1, input.getOrigin(FunctionInput.ORIGIN_NAME).getDimensions());
input = new FunctionInput("test", new Function[]{new ConstantFunction(1, 1f), new ConstantFunction(1, 1f)}, Units.UNK);
assertEquals(2, input.getOrigin(FunctionInput.ORIGIN_NAME).getDimensions());
try {
input = new FunctionInput("test", new Function[]{new ConstantFunction(2, 1f)}, Units.UNK);
fail("Should have thrown exception due to 2-D function");
} catch (Exception e) {} //exception is expected
}