Ejemplo n.º 1
0
 /**
  * Declares an association between this object and a Distributor object
  *
  * @param v Distributor
  * @throws TorqueException
  */
 public void setDistributor(Distributor v) throws TorqueException {
   if (v == null) {
     setDistributorId(1000);
   } else {
     setDistributorId(v.getDistributorId());
   }
   aDistributor = v;
 }
Ejemplo n.º 2
0
  public void testCtorAndID() throws Exception {
    // init test system
    new Engine() {
      void reset() {
        _instance = null;
      }
    }.reset();

    new jmri.configurexml.ConfigXmlManager()
        .load(new java.io.File("java/test/jmri/jmrix/rps/LocationTestPanel.xml"));

    // and push a good measurement
    Reading loco = new Reading("27", null);
    Measurement m = new Measurement(loco, 0.0, 0.0, 0.0, 0.133, 5, "source");
    Distributor.instance().submitMeasurement(m);

    //    }
    //  test order isn't guaranteed!
    //    public void testXPanelCreation() {
    JFrame f = jmri.util.JmriJFrame.getFrame("RPS Location Test");
    Assert.assertTrue("found frame", f != null);
    f.dispose();
  }