Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch error message param order.

  • Loading branch information...
commit c5f87521f1af8845858ab69db28a470e0516a711 1 parent 1e56738
@stephenh authored
View
2  src/main/scala/fakesdb/actions/PutAttributes.scala
@@ -91,7 +91,7 @@ class PutAttributes(data: Data) extends Action(data) {
object ConditionalCheckFailedException {
def apply(condition: Tuple2[String, Option[String]], actual: List[String] = List()) = condition match {
case (name, None) => new ConditionalCheckFailedException("Attribute (%s) value exists".format(name))
- case (name, Some(value)) => new ConditionalCheckFailedException("Attribute (%s) value is (%s) but was expected (%s).".format(name, value, actual))
+ case (name, Some(value)) => new ConditionalCheckFailedException("Attribute (%s) value is (%s) but was expected (%s).".format(name, actual, value))
}
}
View
2  src/test/scala/fakesdb/PutAttributesTest.scala
@@ -71,7 +71,7 @@ class PutAttributesTest extends AbstractFakeSdbTest {
@Test
def testConditionalPut(): Unit = {
add(domaina, "itema", "a" -> "1")
- assertFails("ConditionalCheckFailed", "Attribute (a) value is (2) but was expected (List(1)).", {
+ assertFails("ConditionalCheckFailed", "Attribute (a) value is (List(1)) but was expected (2).", {
add(domaina, "itema", hasValue("a", "2"), "b" -> "1")
})
}
Please sign in to comment.
Something went wrong with that request. Please try again.