Disabled external gits

This commit is contained in:
2022-04-07 18:43:21 +02:00
parent 182267a8cb
commit 88cb3426ad
1067 changed files with 102374 additions and 6 deletions

View File

@@ -0,0 +1,45 @@
package ch.epfl.alpano;
import static org.junit.Assert.*;
import org.junit.Test;
import ch.epfl.alpano.dem.ContinuousElevationModel;
import ch.epfl.alpano.dem.ElevationProfile;
public class PanoramaCompTest {
@Test(expected = NullPointerException.class)
public void throwsNullPointerUponConstruction(){
new PanoramaComputer(null);
}
@Test
public void givesTrivialZero(){
double zero =PanoramaComputer.rayToGroundDistance(
new ElevationProfile( new ContinuousElevationModel(new TestDemForPanoramaComp(new Interval2D(new Interval1D(-100, 100),
new Interval1D(-100, 100)))),
new GeoPoint(0,0),2.5,100), 0.0, 0.0).applyAsDouble(
1);
assertEquals(0, zero,0.01);
}
@Test(expected = IllegalArgumentException.class)
public void throwsIllegalArgumentExceptionOnNegValues(){
double zero =PanoramaComputer.rayToGroundDistance(
new ElevationProfile( new ContinuousElevationModel(new TestDemForPanoramaComp(new Interval2D(new Interval1D(-100, 100),
new Interval1D(-100, 100)))),
new GeoPoint(0,0),0,100), 0.0, 1.0).applyAsDouble(
-50);
assertEquals(0, zero,0);
}
}