Skip to content

Commit 7ee9c71

Browse files
committed
fix(test): retrieve current position from observable when asserting
1 parent 494107b commit 7ee9c71

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • alchemist-test/src/main/kotlin/it/unibo/alchemist/test

alchemist-test/src/main/kotlin/it/unibo/alchemist/test/Assertions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ infix fun <T, P : Position<P>> Environment<T, P>.shouldEqual(other: Environment<
9494
assertEquals(other.isTerminated, isTerminated)
9595
assertContentEquals(other.sizeInDistanceUnits, sizeInDistanceUnits)
9696
linkingRule shouldEqual other.linkingRule
97-
val positions = nodes.sortedBy { it.id }.map { getPosition(it) }
98-
val otherPositions = other.sortedBy { it.id }.map { getPosition(it) }
97+
val positions = nodes.sortedBy { it.id }.map { getCurrentPosition(it) }
98+
val otherPositions = other.sortedBy { it.id }.map { getCurrentPosition(it) }
9999
positions.ebeEquals(otherPositions) { expected, actual -> assertEquals(expected, actual) }
100100
nodes.ebeEquals(other.nodes) { expected, actual ->
101101
actual shouldEqual expected

0 commit comments

Comments
 (0)