From 9ab159cabc290dbc271e9716249ab9eb67ed5879 Mon Sep 17 00:00:00 2001 From: adamw Date: Sat, 8 Jul 2017 20:14:09 +0200 Subject: data -> body --- .../test/scala/com/softwaremill/sttp/BasicTests.scala | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/src/test/scala/com/softwaremill') diff --git a/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala b/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala index cc2d2fc..597c042 100644 --- a/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala +++ b/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala @@ -75,13 +75,13 @@ class BasicTests extends FlatSpec with Matchers with BeforeAndAfterAll with Scal def parseResponseTests(): Unit = { name should "parse response as string" in { - val response = postEcho.data(testBody).send(responseAsString) + val response = postEcho.body(testBody).send(responseAsString) val fc = forceResponse.force(response).body fc should be (expectedPostEchoResponse) } name should "parse response as a byte array" in { - val response = postEcho.data(testBody).send(responseAsByteArray) + val response = postEcho.body(testBody).send(responseAsByteArray) val fc = new String(forceResponse.force(response).body, "UTF-8") fc should be (expectedPostEchoResponse) } @@ -100,25 +100,25 @@ class BasicTests extends FlatSpec with Matchers with BeforeAndAfterAll with Scal def bodyTests(): Unit = { name should "post a string" in { - val response = postEcho.data(testBody).send(responseAsString) + val response = postEcho.body(testBody).send(responseAsString) val fc = forceResponse.force(response).body fc should be (expectedPostEchoResponse) } name should "post a byte array" in { - val response = postEcho.data(testBodyBytes).send(responseAsString) + val response = postEcho.body(testBodyBytes).send(responseAsString) val fc = forceResponse.force(response).body fc should be (expectedPostEchoResponse) } name should "post an input stream" in { - val response = postEcho.data(new ByteArrayInputStream(testBodyBytes)).send(responseAsString) + val response = postEcho.body(new ByteArrayInputStream(testBodyBytes)).send(responseAsString) val fc = forceResponse.force(response).body fc should be (expectedPostEchoResponse) } name should "post a byte buffer" in { - val response = postEcho.data(ByteBuffer.wrap(testBodyBytes)).send(responseAsString) + val response = postEcho.body(ByteBuffer.wrap(testBodyBytes)).send(responseAsString) val fc = forceResponse.force(response).body fc should be (expectedPostEchoResponse) } @@ -126,7 +126,7 @@ class BasicTests extends FlatSpec with Matchers with BeforeAndAfterAll with Scal name should "post a file" in { val f = File.newTemporaryFile().write(testBody) try { - val response = postEcho.data(f.toJava).send(responseAsString) + val response = postEcho.body(f.toJava).send(responseAsString) val fc = forceResponse.force(response).body fc should be(expectedPostEchoResponse) } finally f.delete() @@ -135,7 +135,7 @@ class BasicTests extends FlatSpec with Matchers with BeforeAndAfterAll with Scal name should "post a path" in { val f = File.newTemporaryFile().write(testBody) try { - val response = postEcho.data(f.toJava.toPath).send(responseAsString) + val response = postEcho.body(f.toJava.toPath).send(responseAsString) val fc = forceResponse.force(response).body fc should be(expectedPostEchoResponse) } finally f.delete() -- cgit v1.2.3