Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
(breaking) test for object graph
Browse files Browse the repository at this point in the history
  • Loading branch information
maxaf committed Jan 2, 2011
1 parent 141a25b commit 953c11e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/test/scala/salat/SalatSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ class SalatSpec extends Specification with PendingUntilFixed with CasbahLogging
dbo must notHaveKey("cc")
dbo must havePair("ccc" -> e.ccc.get)
}

"work with object graphs" in {
val a = graph
val dbo: MongoDBObject = GraterA.asDBObject(a)
log.info("before: %s", a)
log.info("after : %s", dbo.asDBObject)
dbo must havePair("x" -> "x")
fail
} pendingUntilFixed
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/test/scala/salat/TestModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@ object `package` {

def graph = A("x", Some("y"),
B(Some(80), 81,
C(Seq("l1", "l2"), List(1, 2), Nil)))
C(Seq("l1", "l2"), List(1, 2), List(
D(IMap.empty, MMap.empty, None),
D(IMap.empty, MMap.empty, None),
D(IMap.empty, MMap.empty, None)
))))
}

0 comments on commit 953c11e

Please sign in to comment.