diff options
author | vlad <vlad@driver.xyz> | 2018-01-25 14:12:31 -0800 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2018-01-25 14:12:31 -0800 |
commit | a0877d81ca2844d75dc361b5ce7c99afacd6e25f (patch) | |
tree | 8fe49f45cbcddbbb9a3d167099abe7aa2625e56b /src/test/scala/xyz/driver/pdsuidomain/formats/json/BridgeUploadQueueFormatSuite.scala | |
parent | 46a22e9ab324a0068a85952cdc809800f360f445 (diff) | |
download | rest-query-a0877d81ca2844d75dc361b5ce7c99afacd6e25f.tar.gz rest-query-a0877d81ca2844d75dc361b5ce7c99afacd6e25f.tar.bz2 rest-query-a0877d81ca2844d75dc361b5ce7c99afacd6e25f.zip |
Extracting query library
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/BridgeUploadQueueFormatSuite.scala')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuidomain/formats/json/BridgeUploadQueueFormatSuite.scala | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/BridgeUploadQueueFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/BridgeUploadQueueFormatSuite.scala deleted file mode 100644 index 9aaecae..0000000 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/BridgeUploadQueueFormatSuite.scala +++ /dev/null @@ -1,32 +0,0 @@ -package xyz.driver.pdsuidomain.formats.json - -import java.time.LocalDateTime - -import spray.json._ -import org.scalatest.{FlatSpec, Matchers} -import xyz.driver.pdsuicommon.concurrent.BridgeUploadQueue - -class BridgeUploadQueueFormatSuite extends FlatSpec with Matchers { - import xyz.driver.pdsuidomain.formats.json.bridgeuploadqueue._ - - "Json format for BridgeUploadQueue.Item" should "read and write correct JSON" in { - val item = BridgeUploadQueue.Item( - kind = "kind", - tag = "tag", - created = LocalDateTime.parse("2017-08-10T18:00:00"), - attempts = 0, - nextAttempt = LocalDateTime.parse("2017-08-10T18:10:00"), - completed = false, - dependencyKind = Some("dependency king"), - dependencyTag = None - ) - val writtenJson = queueUploadItemFormat.write(item) - - writtenJson should be( - """{"kind":"kind","tag":"tag","created":"2017-08-10T18:00Z","attempts":0,"nextAttempt":"2017-08-10T18:10Z","completed":false}""".parseJson) - - val parsedItem = queueUploadItemFormat.read(writtenJson) - parsedItem should be(item.copy(dependencyKind = None, completed = true)) - } - -} |