@@ -14,6 +14,8 @@ import org.evomaster.core.sql.schema.ColumnDataType
1414import org.evomaster.core.sql.schema.Table
1515import org.evomaster.core.sql.schema.TableId
1616import org.junit.jupiter.api.Assertions.assertEquals
17+ import org.junit.jupiter.api.Assertions.assertFalse
18+ import org.junit.jupiter.api.Assertions.assertTrue
1719import org.junit.jupiter.api.Test
1820
1921class RestIndividualBuilderTest {
@@ -168,9 +170,16 @@ class RestIndividualBuilderTest {
168170 // initializing SQL actions should contain both sql1 and sql2
169171 val inits = merged.seeInitializingActions().filterIsInstance<SqlAction >()
170172 assertEquals(4 , inits.size)
171- // check their table names preserved and order: first's sql then second's sql
172- assertEquals(" T1" , inits[0 ].table.name)
173- assertEquals(" T2" , inits[1 ].table.name)
173+ /*
174+ check their table names preserved and order: first's sql then second's sql.
175+ however, existing data is always at the beginning
176+ */
177+ assertTrue(inits[0 ].representExistingData)
178+ assertTrue(inits[1 ].representExistingData)
179+ assertFalse(inits[2 ].representExistingData)
180+ assertFalse(inits[3 ].representExistingData)
181+ assertEquals(" T1" , inits[2 ].table.name)
182+ assertEquals(" T2" , inits[3 ].table.name)
174183
175184 // merged total actions should be sum of both initial individuals
176185 val before = first.seeAllActions().size + second.seeAllActions().size
0 commit comments