diff --git a/relate/src/test/scala/ParameterizationTest.scala b/relate/src/test/scala/ParameterizationTest.scala index 3e94302..1b88bc2 100644 --- a/relate/src/test/scala/ParameterizationTest.scala +++ b/relate/src/test/scala/ParameterizationTest.scala @@ -22,11 +22,12 @@ class ParameterizationTest extends Specification { "tuple paramater" should { "use sub-parameter placeholders" in { class CustomParameter(value: Int) extends SingleParameter { - protected[this] def set(statement: PreparedStatement, i: Int) = implicitly[Parameterizable[Int]].set(statement, i, value) + protected[this] def set(statement: PreparedStatement, i: Int) = + implicitly[Parameterizable[Int]].set(statement, i, value) override def appendPlaceholders(stringBuilder: StringBuilder) = stringBuilder.append("?::smallint") } val querySql = sql"INSERT INTO myTable (foo, bar) VALUES (${(1, new CustomParameter(1))})" - querySql.toString mustEqual("INSERT INTO myTable (foo, bar) VALUES (?,?::smallint)") + querySql.toString mustEqual "INSERT INTO myTable (foo, bar) VALUES (?,?::smallint)" } } } diff --git a/relate/src/test/scala/SqlResultSpec.scala b/relate/src/test/scala/SqlResultSpec.scala index 5903c5a..7b7f9ce 100644 --- a/relate/src/test/scala/SqlResultSpec.scala +++ b/relate/src/test/scala/SqlResultSpec.scala @@ -112,8 +112,8 @@ class SqlResultSpec extends Specification with Mockito { "return a list of 3 elements with an explicit parser" in { val (rs, _, result) = getMocks - rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 - rs.next returns true thenReturn true thenReturn true thenReturn false + rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 + rs.next returns true thenReturn true thenReturn true thenReturn false rs.getLong("id") returns (100L: java.lang.Long) rs.getString("name") returns "the name" @@ -136,8 +136,8 @@ class SqlResultSpec extends Specification with Mockito { "return a list of 3 elements with an implicit parser" in { val (rs, _, result) = getMocks - rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 - rs.next returns true thenReturn true thenReturn true thenReturn false + rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 + rs.next returns true thenReturn true thenReturn true thenReturn false rs.getLong("id") returns (100L: java.lang.Long) rs.getString("name") returns "the name" @@ -162,8 +162,8 @@ class SqlResultSpec extends Specification with Mockito { "return a map of 3 elements with an explicit parser" in { val (rs, _, result) = getMocks - rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 - rs.next returns true thenReturn true thenReturn true thenReturn false + rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 + rs.next returns true thenReturn true thenReturn true thenReturn false rs.getLong("id") returns 1L thenReturns 2L thenReturns 3L rs.getString("name") returns "the name" @@ -191,8 +191,8 @@ class SqlResultSpec extends Specification with Mockito { val (rs, _, result) = getMocks import java.lang.{Long => L} - rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 - rs.next returns true thenReturn true thenReturn true thenReturn false + rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 + rs.next returns true thenReturn true thenReturn true thenReturn false rs.getLong("id") returns (1: L) thenReturns (2: L) thenReturns (3: L) rs.getString("name") returns "the name" @@ -215,8 +215,8 @@ class SqlResultSpec extends Specification with Mockito { val (rs, _, result) = getMocks import java.lang.{Long => L} - rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 thenReturn 4 - rs.next returns true thenReturn true thenReturn true thenReturn true thenReturn false + rs.getRow returns 0 thenReturn 1 thenReturn 2 thenReturn 3 thenReturn 4 + rs.next returns true thenReturn true thenReturn true thenReturn true thenReturn false rs.getString("id") returns "1" thenReturns "2" thenReturns "1" thenReturns "2" rs.getString("name") returns "one" thenReturns "two" thenReturns "three" thenReturns "four"