-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f26f71b
commit acd3e08
Showing
3 changed files
with
26 additions
and
83 deletions.
There are no files selected for viewing
81 changes: 0 additions & 81 deletions
81
formats-tests/src/test/scala/flatgraph/TestDomainSimple.scala
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
formats-tests/src/test/scala/flatgraph/TestGraphSimple.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package flatgraph | ||
|
||
import flatgraph.testdomains.generic.GenericDomain | ||
import flatgraph.testdomains.generic.edges.ConnectedTo | ||
import flatgraph.testdomains.generic.nodes.NewNodeA | ||
|
||
import java.nio.file.Path | ||
|
||
object TestGraphSimple { | ||
def create(storageMaybe: Option[Path] = None): GenericDomain = { | ||
val genericDomain = storageMaybe match { | ||
case None => GenericDomain.empty | ||
case Some(storagePath) => GenericDomain.withStorage(storagePath) | ||
} | ||
val graph = genericDomain.graph | ||
val node1 = NewNodeA().stringMandatory("node 1 a").stringOptional("node 1 b").stringList(Seq("node 1 c1", "node 1 c2")) | ||
val node2 = NewNodeA().intMandatory(1).intOptional(2).intList(Seq(10, 11, 12)) | ||
|
||
DiffGraphApplier.applyDiff( | ||
graph, | ||
GenericDomain.newDiffGraphBuilder | ||
.addEdge(node1, node2, ConnectedTo.Label, "edge property") | ||
) | ||
genericDomain | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters