Last active
August 29, 2015 13:58
-
-
Save wadouk/9977557 to your computer and use it in GitHub Desktop.
api devoxx play scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import akka.util.Timeout | |
import org.scalatest.FunSuite | |
import org.scalatest.matchers.ShouldMatchers | |
import play.api.libs.json.JsValue | |
import play.api.libs.ws.WS | |
import scala.concurrent.duration._ | |
import scala.concurrent.{Await, Future} | |
class DevoxxTest extends FunSuite with ShouldMatchers{ | |
import play.api.libs.concurrent.Execution.Implicits._ | |
implicit val timeout = Timeout(50000 milli) | |
test("load devoxx") { | |
val future: Future[Seq[JsValue]] = WS.url("http://cfp.devoxx.fr/api/conferences/devoxxFR2014/schedules/").get().map { | |
response => { | |
(response.json \\ "href") | |
} | |
} | |
println(Await.result(future,timeout.duration).asInstanceOf[List[String]]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment