-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unit test for DetectorRegistration
- Loading branch information
1 parent
b6811ec
commit ebeb5b2
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...ions/src/test/java/org/eclipse/mosaic/interactions/detector/DetectorRegistrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
|
||
} | ||
} |