marking/trade_test4.scala
author Christian Urban <urbanc@in.tum.de>
Fri, 07 Dec 2018 07:57:54 +0000
changeset 240 b8cdaf51ffef
parent 65 f59e70e2ad82
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
64
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
//println("starting test now")
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
65
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
     4
import scala.concurrent._
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
     5
import scala.concurrent.duration._
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
     6
import ExecutionContext.Implicits.global
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
     7
import scala.language.postfixOps 
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
     8
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
     9
lazy val f = Future {
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
    10
  assert(query_company("YHOO") == ("1996-07-24", "2000-01-03"))
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
    11
  assert(query_company("IBM") == ("1962-06-14", "2013-03-14"))
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
    12
  assert(query_company("BIDU") == ("2006-02-07", "2014-11-11"))
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
    13
}
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
    14
f59e70e2ad82 updated
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
    15
Await.result(f, 120 second)