Commit 53e066b9 authored by npedot's avatar npedot
Browse files

adds sakila scenario integration test

parent be243aac
......@@ -16,6 +16,16 @@
mvn test
## test integration (manual invocation)
for person vplit scenario:
mvn -Dtest=PersonVSplitScenarioTI test
for sakila scenario (it requires postgres db access and configuration):
mvn -Dtest=SakilaScenarioTI test
## edit
......
......@@ -18,9 +18,9 @@ class PersonVSplitScenario {
personTable.name= "person"
val colSSN = Column("SSN", "id.SSN", "dbname.SSN")
personTable.columns.add(colSSN)
val colT = Column("T", "id.SSN", "dbname.SSN")
val colT = Column("T", "id.T", "dbname.T")
personTable.columns.add(colT)
val colS = Column("S", "id.SSN", "dbname.SSN")
val colS = Column("S", "id.S", "dbname.S")
personTable.columns.add(colS)
db.schema.tables.add(personTable)
val primaryConstraint = Constraint()
......@@ -52,6 +52,29 @@ class PersonVSplitScenario {
}
private fun apply(personMetadata: Database, detected: UseCaseResult<Database>): UseCaseResult<Database>{
// pure person
val table = Table()
table.name= "pure_person"
personMetadata.schema.tables.add(table)
val colSSN = Column("SSN", "id.SSN", "dbname.SSN")
table.columns.add(colSSN)
// person with only telephone
val tableWithT = Table()
tableWithT.name= "person_with_T"
personMetadata.schema.tables.add(tableWithT)
val colT = Column("T", "id.T", "dbname.T")
tableWithT.columns.add(colSSN)
tableWithT.columns.add(colT)
// person with only telephone
val tableWithS = Table()
tableWithS.name= "person_with_S"
personMetadata.schema.tables.add(tableWithS)
val colS = Column("S", "id.S", "dbname.S")
tableWithS.columns.add(colSSN)
tableWithS.columns.add(colS)
return UseCaseResult("done apply", personMetadata)
}
}
\ No newline at end of file
package unibz.cs.semint.kprime.scenario
import org.junit.Test
class SakilaScenarioTI {
@Test
fun test_sakila_scenario() {
// given
val sakilaScenario = SakilaScenario()
// when
sakilaScenario.run()
// then
// prints manipulated sakila database
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment