use of org.hwyl.sexytopo.model.survey.Station 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.Station in project sexytopo by richsmith.
the class CrossSectionerTest method testStraightNorthCrossSection.
@Test
public void testStraightNorthCrossSection() {
Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
Station s2 = testSurvey.getStationByName("2");
double angle = CrossSectioner.getAngleOfSection(testSurvey, s2);
Assert.assertEquals(0.0, angle, SexyTopo.ALLOWED_DOUBLE_DELTA);
}
use of org.hwyl.sexytopo.model.survey.Station in project sexytopo by richsmith.
the class StationRenameTest method testRenamingToExistingNameFails.
@Test(expected = IllegalArgumentException.class)
public void testRenamingToExistingNameFails() {
Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
Station s2 = testSurvey.getStationByName("2");
SurveyUpdater.renameStation(testSurvey, s2, "1");
}
use of org.hwyl.sexytopo.model.survey.Station in project sexytopo by richsmith.
the class StationRenameTest method testRenameStation.
@Test
public void testRenameStation() {
Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
Station s2 = testSurvey.getStationByName("2");
SurveyUpdater.renameStation(testSurvey, s2, "ShinyNewName");
Station shinyNewStation = testSurvey.getStationByName("ShinyNewName");
Assert.assertEquals("ShinyNewName", shinyNewStation.getName());
}
use of org.hwyl.sexytopo.model.survey.Station in project sexytopo by richsmith.
the class StationRenameTest method testGetStationByNameGetsExistingStation.
@Test
public void testGetStationByNameGetsExistingStation() {
Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
Station s1 = testSurvey.getStationByName("1");
Assert.assertEquals("1", s1.getName());
}
Aggregations