|
|
@ -8,6 +8,8 @@ import space.kklochko.jdbc_hospital_example.db.factories.DataBaseConnection
|
|
|
|
import space.kklochko.jdbc_hospital_example.db.repositories.DepartmentRepository
|
|
|
|
import space.kklochko.jdbc_hospital_example.db.repositories.DepartmentRepository
|
|
|
|
import space.kklochko.jdbc_hospital_example.db.repositories.IndicatorRepository
|
|
|
|
import space.kklochko.jdbc_hospital_example.db.repositories.IndicatorRepository
|
|
|
|
import space.kklochko.jdbc_hospital_example.db.repositories.PatientRepository
|
|
|
|
import space.kklochko.jdbc_hospital_example.db.repositories.PatientRepository
|
|
|
|
|
|
|
|
import space.kklochko.jdbc_hospital_example.db.repositories.blocks.CreateTables
|
|
|
|
|
|
|
|
import space.kklochko.jdbc_hospital_example.db.repositories.blocks.TurnOnUUIDPlugin
|
|
|
|
import space.kklochko.jdbc_hospital_example.models.Indicator
|
|
|
|
import space.kklochko.jdbc_hospital_example.models.Indicator
|
|
|
|
import spock.lang.Shared
|
|
|
|
import spock.lang.Shared
|
|
|
|
import spock.lang.Specification
|
|
|
|
import spock.lang.Specification
|
|
|
@ -31,8 +33,11 @@ class CommandEntitySpec extends Specification {
|
|
|
|
db = (new LoadDataBaseConfigFromEnvFile()).load("db.testing")
|
|
|
|
db = (new LoadDataBaseConfigFromEnvFile()).load("db.testing")
|
|
|
|
dbc = new DataBaseConnection(db)
|
|
|
|
dbc = new DataBaseConnection(db)
|
|
|
|
|
|
|
|
|
|
|
|
IndicatorRepository repo = new IndicatorRepository(dbc)
|
|
|
|
TurnOnUUIDPlugin turnOnUUIDPlugin = new TurnOnUUIDPlugin()
|
|
|
|
repo.createTable()
|
|
|
|
turnOnUUIDPlugin.create(dbc)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CreateTables createTables = new CreateTables()
|
|
|
|
|
|
|
|
createTables.create(dbc)
|
|
|
|
|
|
|
|
|
|
|
|
sql = Sql.newInstance(db.getUrl(), db.getProperties().get("user"), db.getProperties().get("password"))
|
|
|
|
sql = Sql.newInstance(db.getUrl(), db.getProperties().get("user"), db.getProperties().get("password"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|