Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ReadSpec read and change names from run to runGraph and alike
- Loading branch information
1 parent
f83708e
commit 14931fb
Showing
6 changed files
with
53 additions
and
29 deletions.
There are no files selected for viewing
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
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
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
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
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
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 |
---|---|---|
@@ -1,8 +1,30 @@ | ||
package dsl | ||
|
||
import org.scalatest.{BeforeAndAfter, FlatSpec, Matchers} | ||
import oriented.{InMemoryClient, OrientFormat} | ||
import oriented.syntax._ | ||
|
||
/** | ||
* Test spec for Read DSL | ||
*/ | ||
class ReadSpec { | ||
class ReadSpec extends FlatSpec with Matchers with BeforeAndAfter { | ||
|
||
object Test | ||
|
||
implicit val testFormat: OrientFormat[Test.type] = new OrientFormat[Test.type] { | ||
|
||
override def format: OrientRead[Test.type] = read.read(Test) | ||
|
||
override def name: String = "Test" | ||
|
||
override def properties(model: Test.type): Map[String, Any] = Map() | ||
} | ||
|
||
implicit val orientClient = InMemoryClient("test") | ||
|
||
"Read constructor" should "save edge with no fields" in { | ||
val edge = orientClient.addVertex(Test) | ||
edge.runGraphUnsafe(enableTransactions = false).element should === (Test) | ||
} | ||
|
||
} |