File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
main/kotlin/org/modelix/model/sync
test/kotlin/org/modelix/model/sync Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ import org.modelix.model.api.*
4
4
import org.modelix.model.data.ModelData
5
5
import org.modelix.model.data.NodeData
6
6
7
- class ModelImporter (private val branch : IBranch , private val data : ModelData ) {
7
+ class ModelImporter (private val branch : IBranch ) {
8
8
9
9
companion object {
10
10
const val idRole = " originalId"
11
11
}
12
12
13
13
private lateinit var originalIdToRef: MutableMap <String , INodeReference >
14
14
15
- fun import () {
15
+ fun import (data : ModelData ) {
16
16
originalIdToRef = mutableMapOf ()
17
17
branch.runWrite {
18
18
val rootNode = branch.getRootNode()
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class ModelImporterTest {
35
35
model.load(branch)
36
36
// println("PRE-SPEC ${model.toJson()}")
37
37
// println("PRE-LOADED ${branch.getRootNode().toJson()}")
38
- ModelImporter (branch, newModel ).import()
38
+ ModelImporter (branch).import(newModel )
39
39
// println("POST-SPEC ${newModel.root.toJson()}")
40
40
// println("POST-LOADED ${branch.getRootNode().toJson()}")
41
41
}
@@ -82,7 +82,7 @@ class ModelImporterTest {
82
82
val tempBranch = PBranch (tree, IdGenerator .getInstance(1 ))
83
83
tempBranch.runWrite {
84
84
assertDoesNotThrow {
85
- ModelImporter (tempBranch, newModel ).import()
85
+ ModelImporter (tempBranch).import(newModel )
86
86
}
87
87
val children = tempBranch.getRootNode().allChildren.toList()
88
88
assertEquals(newModel.root.children.size, children.size)
You can’t perform that action at this time.
0 commit comments