Skip to content

Commit

Permalink
cleanup: drop TestDomainSimple
Browse files Browse the repository at this point in the history
  • Loading branch information
mpollmeier committed Apr 29, 2024
1 parent f26f71b commit acd3e08
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 83 deletions.
81 changes: 0 additions & 81 deletions formats-tests/src/test/scala/flatgraph/TestDomainSimple.scala

This file was deleted.

26 changes: 26 additions & 0 deletions formats-tests/src/test/scala/flatgraph/TestGraphSimple.scala
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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ package flatgraph.formats.graphson

import better.files.File
import flatgraph.{DiffGraphApplier, GenericDNode, TestGraphSimple}
import flatgraph.TestDomainSimple.*
import flatgraph.testdomains.generic.Language.*
import flatgraph.testdomains.generic.nodes.NodeA
import flatgraph.TestDomainSimple.PropertyNames.{ContainedTestNodeProperty, IntProperty}
import flatgraph.misc.TestUtils.applyDiff
import flatgraph.testdomains.generic.GenericDomain
import flatgraph.testdomains.generic.nodes.NewNodeB
Expand Down

0 comments on commit acd3e08

Please sign in to comment.