use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class SurveyJsonTranslaterTest method testSimpleSurveyIsParsed.
@Test
public void testSimpleSurveyIsParsed() throws Exception {
Survey survey = BasicTestSurveyCreator.createStraightNorth();
String text = SurveyJsonTranslater.toText(survey, "test", 0);
Survey newSurvey = new Survey(TEST_SURVEY_NAME);
SurveyJsonTranslater.populateSurvey(survey, text);
SurveyChecker.areEqual(survey, newSurvey);
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class SurvexExporterTest method testBasicExport.
@Test
public void testBasicExport() {
SurvexExporter survexExporter = new SurvexExporter();
Survey oneNorth = BasicTestSurveyCreator.createStraightNorth();
String content = survexExporter.getContent(oneNorth);
Assert.assertTrue(content.contains("1\t2\t5.000\t0.00\t0.00"));
Assert.assertTrue(content.contains("2\t3\t5.000\t0.00\t0.00"));
Assert.assertTrue(content.contains("3\t4\t5.000\t0.00\t0.00"));
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class SurvexExporterTest method testCommentsAreIncluded.
@Test
public void testCommentsAreIncluded() {
SurvexExporter survexExporter = new SurvexExporter();
Survey oneNorth = BasicTestSurveyCreator.createStraightNorthThroughRepeats();
Station latest = oneNorth.getActiveStation();
String testComment = "Comment McComment Face";
latest.setComment(testComment);
String content = survexExporter.getContent(oneNorth);
Assert.assertTrue(content.contains(testComment));
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class TherionImporterTest method testElevationDirectionExtraction.
@Test
public void testElevationDirectionExtraction() throws Exception {
Survey survey = new Survey("Test");
TherionImporter.updateCentreline(LINES, survey);
Station stationTwo = survey.getStationByName("2");
Direction stationTwoDirection = stationTwo.getExtendedElevationDirection();
Assert.assertEquals(Direction.LEFT, stationTwoDirection);
Station stationThree = survey.getStationByName("3");
Direction stationThreeDirection = stationThree.getExtendedElevationDirection();
Assert.assertEquals(Direction.LEFT, stationThreeDirection);
Station stationFive = survey.getStationByName("5");
Direction stationFiveDirection = stationFive.getExtendedElevationDirection();
Assert.assertEquals(Direction.RIGHT, stationFiveDirection);
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class OldStyleLoaderTest method testSimpleSurveyIsParsed.
@Test
public void testSimpleSurveyIsParsed() throws Exception {
String text = "1\t2\t9.11\t121\t-23\n";
Survey survey = new Survey("TestSurvey");
OldStyleLoader.parse(text, survey);
assert survey.getAllStations().size() == 2;
assert survey.getOrigin().getConnectedOnwardLegs().get(0).getDestination().getName().equals("2");
}
Aggregations