Package ca.nengo.model.impl

Examples of ca.nengo.model.impl.ProbeableOrigin


  /*
   * Test method for 'ca.bpt.cn.model.impl.ProbeableOrigin.getName()'
   */
  public void testGetName() throws StructuralException {
    String name = "test";
    ProbeableOrigin origin = new ProbeableOrigin(null, new MockProbeable(new float[0]), "x", 0, name);
    assertEquals(name, origin.getName());
  }
View Full Code Here


  /*
   * Test method for 'ca.bpt.cn.model.impl.ProbeableOrigin.getDimensions()'
   */
  public void testGetDimensions() throws StructuralException {
    ProbeableOrigin origin = new ProbeableOrigin(null, new MockProbeable(new float[0]), "x", 0, "test");
    assertEquals(1, origin.getDimensions());
  }
View Full Code Here

//      fail("Should have thrown exception because state x TimeSeries has length 0");
//    } catch (SimulationException e) {} //exception is expected
   
    //test that last TimeSeries value is returned, etc.
    MockProbeable p = new MockProbeable(new float[]{-1f, 1f});
    ProbeableOrigin origin = new ProbeableOrigin(null, p, "x", 0, "test");
   
    assertEquals(Units.UNK, origin.getValues().getUnits());
    assertTrue(origin.getValues() instanceof RealOutput);
    assertEquals(1, ((RealOutput) origin.getValues()).getDimension());
    assertTrue(((RealOutput) origin.getValues()).getValues()[0] > 0);
  }
View Full Code Here

    assertTrue(((RealOutput) origin.getValues()).getValues()[0] > 0);
  }
 
  public void testConstructor() {
    try {
      new ProbeableOrigin(null, new MockProbeable(new float[0]), "y", 0, "test");
      fail("Should have thrown exception because state y doesn't exist");
    } catch (StructuralException e) {} //exception is expected
  }
View Full Code Here

TOP

Related Classes of ca.nengo.model.impl.ProbeableOrigin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.