aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStewart Stewart <stewinsalot@gmail.com>2016-12-19 19:34:54 -0500
committerStewart Stewart <stewinsalot@gmail.com>2016-12-19 19:34:54 -0500
commitb66ac9deca6875f0a9757f6263d0170312be5bd8 (patch)
tree3628ddf47ce32263db6fca348b0d5bfc5b8d08bc
parentaca1f9c10b89499b073046d9b50fa455b675e20e (diff)
downloaddriver-core-b66ac9deca6875f0a9757f6263d0170312be5bd8.tar.gz
driver-core-b66ac9deca6875f0a9757f6263d0170312be5bd8.tar.bz2
driver-core-b66ac9deca6875f0a9757f6263d0170312be5bd8.zip
test:scalafmt and add assertions
-rw-r--r--src/test/scala/xyz/driver/core/CoreTest.scala21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/test/scala/xyz/driver/core/CoreTest.scala b/src/test/scala/xyz/driver/core/CoreTest.scala
index 72b6bc6..da9fd9a 100644
--- a/src/test/scala/xyz/driver/core/CoreTest.scala
+++ b/src/test/scala/xyz/driver/core/CoreTest.scala
@@ -44,19 +44,20 @@ class CoreTest extends FlatSpec with Matchers with MockitoSugar {
final case class Y(id: Id[Y])
final case class Z(id: Id[Z])
- implicit val xy = Id.Mapper[X,Y]
- implicit val yx = Id.Mapper[Y,X]
- implicit val yz = Id.Mapper[Y,Z]
- implicit val zy = Id.Mapper[Z,Y]
-
- val x = X(Id("0"))
- val y = Y(x.id)
- val z = Z(y.id)
+ implicit val xy = Id.Mapper[X, Y]
+ implicit val yx = Id.Mapper[Y, X]
+ implicit val yz = Id.Mapper[Y, Z]
+ implicit val zy = Id.Mapper[Z, Y]
+
+ // The real test is that the following statements compile:
+ val x = X(Id("0"))
+ val y = Y(x.id)
+ val z = Z(y.id)
val y2 = Y(z.id)
val x2 = X(y2.id)
- x2 === x
- y2 === y
+ (x2 === x) should be(true)
+ (y2 === y) should be(true)
}
"Name" should "have equality and ordering working correctly" in {