Skip to content

Commit

Permalink
softwaremill#124 - Remove wrong copyright headers
Browse files Browse the repository at this point in the history
  • Loading branch information
simong committed Mar 13, 2018
1 parent 84e6f9d commit fb60904
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
/*
* All right reserved - Fronteer LTD
*/
package org.elasticmq.rest.sqs.model


case class RedrivePolicy(
queueName: String,
maxReceiveCount: Int
)

case class RedrivePolicy(queueName: String, maxReceiveCount: Int)
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/*
* All right reserved - Fronteer LTD
*/
package org.elasticmq.rest.sqs.model

import spray.json.{DefaultJsonProtocol, JsNumber, JsObject, JsString, JsValue, JsonFormat, RootJsonFormat, deserializationError}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,18 @@ import org.scalatest.{FlatSpec, Matchers}
import spray.json._

class RedrivePolicyJsonTest extends FlatSpec with Matchers with ScalatestRouteTest {
"redrive policy json format" should "extract object from json" in {
"redrive policy json format" should "extract from and serialize to json" in {
import org.elasticmq.rest.sqs.model.RedrivePolicyJson._

val json =
"""
|{
| "deadLetterTargetArn":"arn:aws:sqs:elasticmq:000000000000:dlq1",
| "maxReceiveCount":"4"
|}
""".stripMargin
val json = """{"deadLetterTargetArn":"arn:aws:sqs:elasticmq:000000000000:dlq1","maxReceiveCount":4}"""
val expectedRedrivePolicy = RedrivePolicy(queueName = "dlq1", maxReceiveCount = 4)

// Verify the policy can be derrived from a JSON string
val rd = json.parseJson.convertTo[RedrivePolicy]
rd should be(expectedRedrivePolicy)

rd should be(RedrivePolicy(
queueName = "dlq1",
maxReceiveCount = 4
))
// Verify serializing the policy to JSON results in the expected JSON string
rd.toJson.compactPrint should be(json)
}

"redrive policy json format" should "support int receive count" in {
Expand Down

0 comments on commit fb60904

Please sign in to comment.