Package model

Examples of model.Timetable


 
 
  @Test
  public void searchScheduleByLineAndStation()
  {
    Timetable timetable1 = new Timetable();
   
    Line line1 = new Line();
    Station station1 = new Station();
   
    timetable1.setLine(line1);
    timetable1.setStation(station1);
    map.getTimetables().add(timetable1);
   
    assertEquals(1, map.searchSchedule(line1, station1).size());
   
    Timetable timetable2 = new Timetable();
    Line line2 = new Line();
    Station station2 = new Station();
   
    timetable2.setLine(line2);
    timetable2.setStation(station2);
    map.getTimetables().add(timetable2);
   
    Timetable timetable3 = new Timetable();
    Line line3 = new Line();
    Station station3 = new Station();
   
    timetable3.setLine(line3);
    timetable3.setStation(station3);
    map.getTimetables().add(timetable3);
   
    assertEquals(1, map.searchSchedule(line1, station1).size());
   
    Timetable timetable4 = new Timetable();
    timetable4.setLine(line3);
    timetable4.setStation(station3);
    map.getTimetables().add(timetable4);
   
    assertEquals(2, map.searchSchedule(line3, station3).size());
  }
View Full Code Here


  }
 
  @Test
  public void searchScheduleByStation()
  {
    Timetable timetable1 = new Timetable()
    Line line1 = new Line();
    Station station1 = new Station();
   
    timetable1.setLine(line1);
    timetable1.setStation(station1);
    map.getTimetables().add(timetable1);
   
    assertEquals(1, map.searchSchedule(station1).size());
   
    Timetable timetable2 = new Timetable();
    Line line2 = new Line();
    Station station2 = new Station();
   
    timetable2.setLine(line2);
    timetable2.setStation(station2);
    map.getTimetables().add(timetable2);
   
    Timetable timetable3 = new Timetable();
    Line line3 = new Line();
    Station station3 = new Station();
   
    timetable3.setLine(line3);
    timetable3.setStation(station3);
    map.getTimetables().add(timetable3);
   
    assertEquals(1, map.searchSchedule(station1).size());
   
    Timetable timetable4 = new Timetable();
    timetable4.setLine(line3);
    timetable4.setStation(station3);
    map.getTimetables().add(timetable4);
   
    assertEquals(2, map.searchSchedule(station3).size());
  }
View Full Code Here

  Timetable timetable;
 
  @Before
  public void init()
  {
    timetable = new Timetable();
  }
View Full Code Here

   *
   * @param controller le controlleur principal du logiciel
   */
  public DeleteTimetables(Controller controller) {
    super();
    this.temp = new Timetable();
    this.temp2 = new Timetable();
    this.controller = controller;
  }
View Full Code Here

      if(temp==null)
      {
        errorPopup("noTimetable");
        return;
      }
      temp=new Timetable(temp);
     
      //Récupère la position de la timetable dans la liste de timetables
      positionInList=controller.positionInListTimetable(temp);
     
      deletePopup();
View Full Code Here

   *
   * @param controller le controlleur principal du logiciel
   */
  public AlterTimetable(Controller controller) {
    super();
    this.temp = new Timetable();
    this.temp2 = new Timetable();
    this.controller = controller;
  }
View Full Code Here

   * @param temp une timetable existante
   */
  public AlterTimetable(Controller controller, Timetable temp) {
    super();
    this.temp = temp;
    this.temp2 = new Timetable();
    this.controller = controller;
  }
View Full Code Here

    if(temp==null)
    {
      errorPopup("noTimetable");
      return;
    }
    temp=new Timetable(temp);
   
    //Récupère la position de la timetable dans la liste de timetables
    positionInList=controller.positionInListTimetable(temp);
    int numberOfPasses = temp.getPeriods().get(numberPeriod).getPasses().size();
   
View Full Code Here

   *
   * @param controller le controlleur principal du logiciel
   */
  public InsertTimetable(Controller controller) {
    super();
    this.temp=new Timetable();
    this.controller=controller;
  }
View Full Code Here

TOP

Related Classes of model.Timetable

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.