diff --git a/co-simulation/lib/mosaic-interactions/src/test/java/org/eclipse/mosaic/interactions/detector/DetectorRegistrationTest.java b/co-simulation/lib/mosaic-interactions/src/test/java/org/eclipse/mosaic/interactions/detector/DetectorRegistrationTest.java new file mode 100644 index 00000000..fb2be472 --- /dev/null +++ b/co-simulation/lib/mosaic-interactions/src/test/java/org/eclipse/mosaic/interactions/detector/DetectorRegistrationTest.java @@ -0,0 +1,32 @@ +package org.eclipse.mosaic.interactions.detector; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; + +import org.eclipse.mosaic.lib.geo.CartesianPoint; +import org.eclipse.mosaic.lib.objects.detector.Detector; +import org.eclipse.mosaic.lib.objects.detector.DetectorType; +import org.eclipse.mosaic.lib.objects.detector.Orientation; +import org.junit.Before; +import org.junit.Test; + +public class DetectorRegistrationTest { + DetectorRegistration detectorRegistration; + @Before + public void setUp() throws Exception { + detectorRegistration = new DetectorRegistration(0, null); + } + + @Test + public void testGetterSetterConstructor() { + Detector detector = new Detector("something", DetectorType.SEMANTIC_LIDAR, new Orientation(23.0, 0, 0), + CartesianPoint.xyz(1, 2, 3)); + detectorRegistration.setDetector(detector); + assertEquals(detector, detectorRegistration.getDetector()); + + DetectorRegistration detectorRegistration1 = new DetectorRegistration(0, detector); + + assertNotEquals(detectorRegistration, detectorRegistration1); + + } +}