aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/xyz/driver
diff options
context:
space:
mode:
authorStewart Stewart <stewinsalot@gmail.com>2016-12-22 17:27:40 -0500
committerStewart Stewart <stewinsalot@gmail.com>2016-12-22 17:27:40 -0500
commita4c857745817092ccb9d2b12d83df74a0f2e25e5 (patch)
tree72f85d7713de52c1f67ea6be202fe657a4e120f8 /src/test/scala/xyz/driver
parent687919e7c163e1ff8a002f1a2c24e4b37f75f20d (diff)
downloaddriver-core-a4c857745817092ccb9d2b12d83df74a0f2e25e5.tar.gz
driver-core-a4c857745817092ccb9d2b12d83df74a0f2e25e5.tar.bz2
driver-core-a4c857745817092ccb9d2b12d83df74a0f2e25e5.zip
add Date#toString and Date.fromString
Diffstat (limited to 'src/test/scala/xyz/driver')
-rw-r--r--src/test/scala/xyz/driver/core/CoreTest.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/scala/xyz/driver/core/CoreTest.scala b/src/test/scala/xyz/driver/core/CoreTest.scala
index e210887..e25bdbe 100644
--- a/src/test/scala/xyz/driver/core/CoreTest.scala
+++ b/src/test/scala/xyz/driver/core/CoreTest.scala
@@ -78,6 +78,16 @@ class CoreTest extends FlatSpec with Matchers with MockitoSugar {
timestamp.toDate(EST) should not be timestamp.toDate(PST)
}
+ "Date" should "correctly convert to and from String" in {
+
+ import xyz.driver.core.generators.nextDate
+ import date._
+
+ for (date <- 1 to 100 map (_ => nextDate())) {
+ Some(date) should be(Date.fromString(date.toString))
+ }
+ }
+
"Name" should "have equality and ordering working correctly" in {
(Name[String]("foo") === Name[String]("foo")) should be(true)