algorithms-for-computing-li.../src/test/java/de/wwwu/awolf/presenter/util/IntersectionCounterTest.java

40 lines
1.1 KiB
Java

package de.wwwu.awolf.presenter.util;
import static org.junit.Assert.assertEquals;
import de.wwwu.awolf.model.dao.Line;
import de.wwwu.awolf.model.dao.LineModel;
import java.util.ArrayList;
import org.junit.Before;
import org.junit.Test;
/**
* Implementierung verschiedener Algorithmen zur Berechnung von Ausgleichsgeraden.
*
* @Author: Armin Wolf
* @Email: a_wolf28@uni-muenster.de
* @Date: 23.10.2017.
*/
public class IntersectionCounterTest {
private LineModel lineModel;
@Before
public void setUp() throws Exception {
lineModel = new LineModel();
lineModel.addLine(new Line(3, 13, 10, 3));
lineModel.addLine(new Line(1, 9, 1, 9));
lineModel.addLine(new Line(1, 12, 4, 6));
for (Line l : lineModel.getLines()) {
System.out.println("Steigung: " + l.getM() + "\t y-Achsenabschnitt: " + l.getB());
}
}
@Test
public void run() throws Exception {
// IntersectionComputer instance = IntersectionComputer.getInstance();
// assertEquals(3, IntersectionComputer.getInstance()
// .compute(new ArrayList<>(lineModel.getLines()), -9999, 9999).size());
}
}