Package de.hwrberlin.it11.tsp.model

Examples of de.hwrberlin.it11.tsp.model.TSPData.addNode()


   * Testet das Hinzuf�gen einer Node zum Projekt.
   */
  public void testNodeAdd() {
    TSPData data = new TSPData();
    int count = data.getNodeList().size();
    data.addNode(new Node(0, 0));
    assertTrue(count + 1 == data.getNodeList().size());
  }



View Full Code Here


   * Testet das L�schen einer Node aus dem Projekt.
   */
  public void testNodeRemove() {
    TSPData data = new TSPData();
    Node node = new Node(0, 0);
    data.addNode(node);
    int count = data.getNodeList().size();
    data.removeNode(node);
    assertTrue(count - 1 == data.getNodeList().size());
  }

View Full Code Here

   * Testet das Bewegen einer Node.
   */
  public void testNodeMove() {
    TSPData data = new TSPData();
    Node node = new Node(100, 100);
    data.addNode(node);
    node.setxCoordinate(150);
    node.setyCoordinate(30);
    assertTrue(node.getxCoordinate() == 150);
    assertTrue(node.getyCoordinate() == 30);
  }
View Full Code Here

   * Testet das Laden von .tsp Dateien.
   */
  public void testWriteAndReadTSP() {
    File file = new File("tspTemp.tsp");
    TSPData data = new TSPData();
    data.addNode(new Node(12.5425235464, 52352.245252));
    data.addNode(new Node(535252.52352352, 25252523.52352352));

    Persister.saveTSPFile(file, data);

    TSPData otherData = Persister.loadTSPFile(file);
View Full Code Here

   */
  public void testWriteAndReadTSP() {
    File file = new File("tspTemp.tsp");
    TSPData data = new TSPData();
    data.addNode(new Node(12.5425235464, 52352.245252));
    data.addNode(new Node(535252.52352352, 25252523.52352352));

    Persister.saveTSPFile(file, data);

    TSPData otherData = Persister.loadTSPFile(file);

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.