Skip to content
Snippets Groups Projects
Commit 9d0e677f authored by Daniel Schramm's avatar Daniel Schramm
Browse files

Feature point compilation error fixed

parent cb0bb4df
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@
<publicPackage>cz.fidentis.analyst.mesh.io.*</publicPackage>
<publicPackage>cz.fidentis.analyst.mesh.*</publicPackage>
<publicPackage>cz.fidentis.analyst.kdtree.*</publicPackage>
<publicPackage>cz.fidentis.analyst.feature</publicPackage>
<publicPackage>cz.fidentis.analyst.feature.*</publicPackage>
<!--<publicPackage>cz.fidentis.analyst.mesh.core.MeshFacet</publicPackage>-->
<!--<publicPackage>cz.fidentis.analyst.mesh.core.MeshPoint</publicPackage>-->
</publicPackages>
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package cz.fidentis.analyst.feature.services;
import cz.fidentis.analyst.feature.FeaturePoint;
import cz.fidentis.analyst.feature.provider.FeaturePointTypeProvider;
import cz.fidentis.analyst.mesh.io.MeshObjLoader;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.Optional;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.DisplayName;
......@@ -38,13 +30,13 @@ public class FeaturePointImportExportServiceTest {
@DisplayName("Test loading a CSV file")
@Test
void importFeaturePointsTest() {
Optional<List<FeaturePoint>> featurePoints = loadFeaturePoints();
assertTrue(featurePoints.isPresent());
assertTrue(featurePoints.get().size() > 0);
assertTrue(featurePoints.get().get(0).getX() == -45.3298
&& featurePoints.get().get(0).getY() == 37.1466
&& featurePoints.get().get(0).getZ() == -40.5415
&& featurePoints.get().get(0).getFeaturePointType().equals(
List<FeaturePoint> featurePoints = loadFeaturePoints();
assertTrue(featurePoints != null);
assertTrue(featurePoints.size() > 0);
assertTrue(featurePoints.get(0).getX() == -45.3298
&& featurePoints.get(0).getY() == 37.1466
&& featurePoints.get(0).getZ() == -40.5415
&& featurePoints.get(0).getFeaturePointType().equals(
FeaturePointTypeProvider.getInstance().getFeaturePointTypeByCode("EX_R"))
);
}
......@@ -52,15 +44,12 @@ public class FeaturePointImportExportServiceTest {
@DisplayName("Test writing a CSV file")
@Test
void exportFeaturePointsTest() throws IOException {
FeaturePointImportExportService service = new FeaturePointImportExportService();
Optional<List<FeaturePoint>> featurePoints = loadFeaturePoints();
service.exportFeaturePoints(featurePoints.get(), "test_file");
List<FeaturePoint> featurePoints = loadFeaturePoints();
FeaturePointImportExportService.exportFeaturePoints(featurePoints, "test_file");
}
private Optional<List<FeaturePoint>> loadFeaturePoints() {
FeaturePointImportExportService service = new FeaturePointImportExportService();
Optional<List<FeaturePoint>> featurePoints = service.importFeaturePoints(testFileDirectory.toString(), TEST_CSV_FILE);
private List<FeaturePoint> loadFeaturePoints() {
List<FeaturePoint> featurePoints = FeaturePointImportExportService.importFeaturePoints(testFileDirectory.toString(), TEST_CSV_FILE);
return featurePoints;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment