Examples of Waypoint


Examples of at.fhj.itm.model.Waypoint

   * @throws IOException
   * @throws JSONException
   */
  @Test
  public void testInsertTripCommitFailed() throws SQLException, IOException, JSONException {
    Waypoint waypoint = new Waypoint(fromLocation, toLocation, mockTripCreator, null, true);
    Trip newTrip = new Trip(mockTripCreator,departure,4,waypoint, "");
    Trip tripWithPoint = newTrip;
    List<Point> points = new ArrayList<Point>();
    points.add(new Point(0, 0.0, 0.0, 0, newTrip.getId()));
    tripWithPoint.setPoints(points);
View Full Code Here

Examples of at.fhj.itm.model.Waypoint

   * @throws IOException
   * @throws JSONException
   */
  @Test
  public void testInsertTriploadGoogleDataThrowsIOException() throws SQLException, IOException, JSONException {
    Waypoint waypoint = new Waypoint(fromLocation, toLocation, mockTripCreator, null, true);
    Trip newTrip = new Trip(mockTripCreator,departure,4,waypoint, "");
    Trip tripWithPoint = newTrip;
    List<Point> points = new ArrayList<Point>();
    points.add(new Point(0, 0.0, 0.0, 0, newTrip.getId()));
    tripWithPoint.setPoints(points);
View Full Code Here

Examples of at.fhj.itm.model.Waypoint

   * @throws IOException
   * @throws JSONException
   */
  @Test
  public void testInsertTriploadGoogleDataThrowsJSONException() throws SQLException, IOException, JSONException {
    Waypoint waypoint = new Waypoint(fromLocation, toLocation, mockTripCreator, null, true);
    Trip newTrip = new Trip(mockTripCreator,departure,4,waypoint, "");
    Trip tripWithPoint = newTrip;
    List<Point> points = new ArrayList<Point>();
    points.add(new Point(0, 0.0, 0.0, 0, newTrip.getId()));
    tripWithPoint.setPoints(points);
View Full Code Here

Examples of at.fhj.itm.model.Waypoint

   * @throws IOException
   * @throws JSONException
   */
  @Test
  public void testInsertTripgetJSONObjectThrowsIOException() throws SQLException, IOException {
    Waypoint waypoint = new Waypoint(fromLocation, toLocation, mockTripCreator, null, true);
    Trip newTrip = new Trip(mockTripCreator,departure,4,waypoint, "");
    Trip tripWithPoint = newTrip;
    List<Point> points = new ArrayList<Point>();
    points.add(new Point(0, 0.0, 0.0, 0, newTrip.getId()));
    tripWithPoint.setPoints(points);
View Full Code Here

Examples of at.fhj.itm.model.Waypoint

    List<Waypoint> wps = new ArrayList<Waypoint>();
    for(int i = 0; i< 10; i++){
      Location from = new Location(1000 + i, "Town " + i);
      Location to = new Location(1000 + i+1, "Town " + i+1);
     
      Waypoint wp = new Waypoint(from, to, user, "WP " + i, true);
      wps.add(wp);
      dao.update(wp,connection);
    }
   
    List<Waypoint> queryWP = dao.getWaypointsFromUser(user,connection);
View Full Code Here

Examples of at.fhj.itm.model.Waypoint

   * @throws IOException
   * @throws JSONException
   */
  @Test
  public void testInsertTriploadAndPersistGoogleDataThrowsSQLException() throws SQLException, IOException, JSONException {
    Waypoint waypoint = new Waypoint(fromLocation, toLocation, mockTripCreator, null, true);
    Trip newTrip = new Trip(mockTripCreator,departure,4,waypoint, "");
    Trip tripWithPoint = newTrip;
    List<Point> points = new ArrayList<Point>();
    points.add(new Point(0, 0.0, 0.0, 0, newTrip.getId()));
    tripWithPoint.setPoints(points);
View Full Code Here

Examples of at.fhj.itm.model.Waypoint

   * Creates new Waypoint and then tests if the Waypoint can be updated
   * by the DAO
   */
  @Test
  public void testUpdate(){
    Waypoint wp = createTestWaypoint();
    dao.update(wp, connection);
    assertTrue(wp.getId() != -1);
    wp.setFrom_location(new Location(8888, "New Location"));
    dao.update(wp, connection);
    Waypoint newWp = dao.getByID(wp.getId(), connection);
    assertEquals(wp, newWp);
   
  }
View Full Code Here

Examples of at.fhj.itm.model.Waypoint

   * @throws IOException
   * @throws JSONException
   */
  @Test
  public void testInsertTriploadAndPersistGoogleDataThrowsDAOException() throws SQLException, IOException, JSONException {
    Waypoint waypoint = new Waypoint(fromLocation, toLocation, mockTripCreator, null, true);
    Trip newTrip = new Trip(mockTripCreator,departure,4,waypoint, "");
    Trip tripWithPoint = newTrip;
    List<Point> points = new ArrayList<Point>();
    points.add(new Point(0, 0.0, 0.0, 0, newTrip.getId()));
    tripWithPoint.setPoints(points);
View Full Code Here

Examples of at.fhj.itm.model.Waypoint

   * Tries to delete a not persisted waypoint which should throw a
   * DAO exception
   */
  @Test(expected=DAOException.class)
  public void testDeleteNotPersisted(){
    Waypoint wp = createTestWaypoint();
    dao.delete(wp, connection);
   
  }
View Full Code Here

Examples of at.fhj.itm.model.Waypoint

    Location location = new Location(1234, "Unit City");
    User user = new User("Unit", "Test", "UnitTest", "1234", "Unit@Test.com", "123456",
        location, new Date(), UUID.randomUUID().toString().replace("-", ""));
    Location from = new Location(8190, "Birkfeld");
    Location to = new Location(8010, "Graz");
    Waypoint wp = new Waypoint(from, to, user, "", true);
    Trip t = new Trip(user, new Date(), 4, wp, "Copyright (C) Google");
   
    return t;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.