use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class ExtendedElevationProjectionTest method testProject5MNorth.
@Test
public void testProject5MNorth() {
Survey survey = BasicTestSurveyCreator.createStraightNorth();
Space<Coord2D> space = Projection2D.EXTENDED_ELEVATION.project(survey);
Map<Station, Coord2D> stationMap = space.getStationMap();
Station two = survey.getStationByName("2");
Coord2D twoCoord = stationMap.get(two);
Coord2D expected = new Coord2D(5, 0);
Assert.assertEquals(expected, twoCoord);
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class StationNamerTest method testNameAdvancesDigitInStraightLine.
@Test
public void testNameAdvancesDigitInStraightLine() {
Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
String newName = StationNamer.generateNextStationName(testSurvey, testSurvey.getActiveStation());
int numberOfStations = testSurvey.getAllStations().size();
Assert.assertEquals(Integer.toString(numberOfStations + 1), newName);
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class SurveyStatsTest method testSurveyComponentCountsFromOrigin.
@Test
public void testSurveyComponentCountsFromOrigin() {
Survey survey = BasicTestSurveyCreator.createStraightNorthWith2EBranchFromS2();
Assert.assertEquals(6, survey.getAllStations().size());
Assert.assertEquals(6, SurveyStats.calcNumberSubStations(survey.getOrigin()));
Assert.assertEquals(5, SurveyStats.calcNumberSubLegs(survey.getOrigin()));
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class LrudTest method testStraightNorthCrossSectionLeftSplay.
@Test
public void testStraightNorthCrossSectionLeftSplay() {
Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
Station s2 = testSurvey.getStationByName("2");
double angle = CrossSectioner.getAngleOfSection(testSurvey, s2);
Leg splay = LRUD.LEFT.createSplay(testSurvey, s2, 5);
Assert.assertEquals(270.0, splay.getAzimuth(), SexyTopo.ALLOWED_DOUBLE_DELTA);
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class BasicTestSurveyCreator method createRightRight.
public static Survey createRightRight() {
Survey survey = new Survey("Test n-shaped Survey");
Leg leg0 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg0);
Leg leg1 = new Leg(5, 90, 0);
SurveyUpdater.updateWithNewStation(survey, leg1);
Leg leg2 = new Leg(5, 180, 0);
SurveyUpdater.updateWithNewStation(survey, leg2);
return survey;
}
Aggregations