Skip to content

Commit

Permalink
Added unit test coverage for DetectedObjectInteraction
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbourelly999 committed Jul 28, 2023
1 parent 1cec564 commit 8a78b85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ public class InfrastructureInstance {
/**
* Constructor for InfrastructureInstance
*
* @param infrastructureId the ID of the infrastructure node
* @param targetAddress the target IP address of the infrastructure node
* @param rxMessagePort the receive message port of the infrastructure node
* @param timeSyncPort the tiyhuuuuuuuuuuuuuuuuuuuuuu----------me synchronization port of the infrastructure
* node
* @param simulatedInteractionPort
* @param location the location of the infrastructure node in the
* simulated environment
* @param infrastructureId the ID of the infrastructure instance
* @param targetAddress the target IP address of the infrastructure instance
* @param rxMessagePort the receive message port of the infrastructure instance
* @param timeSyncPort the time synchronization port of the infrastructure
*
* @param simulatedInteractionPort the simulated interaction port of the infrastructure
* instance
* @param location the location of the infrastructure instance in the
* simulated environment
*/
public InfrastructureInstance(String infrastructureId, InetAddress targetAddress, int rxMessagePort,
int timeSyncPort, int simulatedInteractionPort, CartesianPoint location, List<Detector> sensors) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public void testGetterSetterConstructor() {
assertEquals(detectedObject, interaction.getDetectedObject());

DetectedObjectInteraction interaction2 = new DetectedObjectInteraction(0, detectedObject);

DetectedObjectInteraction interaction3 = interaction2;
assertNotEquals(interaction, interaction2);
assertEquals(interaction2, interaction3);
assertEquals(interaction2.hashCode(), interaction3.hashCode());
}
}

0 comments on commit 8a78b85

Please sign in to comment.