Exemple #1
0
  public void testStagingTrackOrder() {
    Location l = LocationManager.instance().newLocation("TestOrder");
    Track t = l.addTrack("New track 3", Track.STAGING);
    Assert.assertEquals("Location", l, t.getLocation());

    t.setServiceOrder(Track.FIFO);
    Assert.assertEquals("Track Order", Track.NORMAL, t.getServiceOrder());
    t.setServiceOrder(Track.LIFO);
    Assert.assertEquals("Track Order", Track.NORMAL, t.getServiceOrder());
  }
Exemple #2
0
  public void testInterchangeTrackOrder() {
    Location l = LocationManager.instance().newLocation("TestOrder");
    Track t = l.addTrack("New track 4", Track.INTERCHANGE);
    Assert.assertEquals("Location", l, t.getLocation());

    // yards and interchanges do support this feature
    t.setServiceOrder(Track.FIFO);
    Assert.assertEquals("Track Order", Track.FIFO, t.getServiceOrder());
    t.setServiceOrder(Track.LIFO);
    Assert.assertEquals("Track Order", Track.LIFO, t.getServiceOrder());
  }
Exemple #3
0
  public void testSpurTrackOrder() {
    Location l = LocationManager.instance().newLocation("TestOrder");
    Track t = l.addTrack("New track 1", Track.SPUR);
    Assert.assertEquals("Location", l, t.getLocation());

    // sidings and staging don't support this feature
    t.setServiceOrder(Track.FIFO);
    Assert.assertEquals("Track Order", Track.NORMAL, t.getServiceOrder());
    t.setServiceOrder(Track.LIFO);
    Assert.assertEquals("Track Order", Track.NORMAL, t.getServiceOrder());
  }