Skip to content

Commit

Permalink
test fixes for scalatest 3.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
sf2ne committed Mar 9, 2020
1 parent 738032b commit ea2c0f2
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 36 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ lazy val root = (project in file(".")).
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test,

"org.scalatest" %% "scalatest" % "latest.release" % "test",
"org.scalatestplus" %% "junit-4-12" % "latest.release" % "test",
"org.scalacheck" %% "scalacheck" % "latest.release" % "test",
"junit" % "junit" % "latest.release" % "test"
),
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/AdminSuite.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package exchangeapi

import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatestplus.junit.JUnitRunner
import scalaj.http._
import org.json4s._
//import org.json4s.JsonDSL._
Expand All @@ -22,7 +22,7 @@ import com.horizon.exchangeapi._
* clear and detailed tutorial of FunSuite: http://doc.scalatest.org/1.9.1/index.html#org.scalatest.FunSuite
*/
@RunWith(classOf[JUnitRunner])
class AdminSuite extends FunSuite {
class AdminSuite extends AnyFunSuite {

val urlRoot = sys.env.getOrElse("EXCHANGE_URL_ROOT", "http://localhost:8080")
val URL = urlRoot+"/v1"
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/AgbotsSuite.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package exchangeapi

import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatestplus.junit.JUnitRunner
import scalaj.http._
import org.json4s._
//import org.json4s.JsonDSL._
Expand All @@ -24,7 +24,7 @@ import java.time._
* clear and detailed tutorial of FunSuite: http://doc.scalatest.org/1.9.1/index.html#org.scalatest.FunSuite
*/
@RunWith(classOf[JUnitRunner])
class AgbotsSuite extends FunSuite {
class AgbotsSuite extends AnyFunSuite {

val localUrlRoot = "http://localhost:8080"
val urlRoot = sys.env.getOrElse("EXCHANGE_URL_ROOT", localUrlRoot)
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/BusinessSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import org.json4s._
import org.json4s.jackson.JsonMethods._
import org.json4s.native.Serialization.write
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.funsuite.AnyFunSuite
import org.scalatestplus.junit.JUnitRunner
import scalaj.http._

import scala.collection.immutable._
Expand All @@ -23,7 +23,7 @@ import scala.collection.immutable._
* clear and detailed tutorial of FunSuite: http://doc.scalatest.org/1.9.1/index.html#org.scalatest.FunSuite
*/
@RunWith(classOf[JUnitRunner])
class BusinessSuite extends FunSuite {
class BusinessSuite extends AnyFunSuite {

val localUrlRoot = "http://localhost:8080"
val urlRoot = sys.env.getOrElse("EXCHANGE_URL_ROOT", localUrlRoot)
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/CatalogSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import org.json4s._
import org.json4s.jackson.JsonMethods._
import org.json4s.native.Serialization.write
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.funsuite.AnyFunSuite
import org.scalatestplus.junit.JUnitRunner

import scala.collection.immutable._
import scalaj.http._

// Tests the catalog APIs

@RunWith(classOf[JUnitRunner])
class CatalogSuite extends FunSuite {
class CatalogSuite extends AnyFunSuite {

implicit val formats = DefaultFormats // Brings in default date formats etc.

Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/ExchConfigSuite.scala
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package exchangeapi

import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatestplus.junit.JUnitRunner
import com.horizon.exchangeapi._

/**
* Tests for the Version and VersionRange case classes
*/
@RunWith(classOf[JUnitRunner])
class ExchConfigSuite extends FunSuite {
class ExchConfigSuite extends AnyFunSuite {
test("ExchConfig tests") {
ExchConfig.load()
// Note: this test needs to work with the default version of config.json that is in src/main/resources (so that 'make test' in travis works)
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/NodesSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import org.json4s._
import org.json4s.jackson.JsonMethods._
import org.json4s.native.Serialization.write
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.funsuite.AnyFunSuite
import org.scalatestplus.junit.JUnitRunner

import scala.collection.immutable._
import scalaj.http._
Expand All @@ -24,7 +24,7 @@ import scalaj.http._
* clear and detailed tutorial of FunSuite: http://doc.scalatest.org/1.9.1/index.html#org.scalatest.FunSuite
*/
@RunWith(classOf[JUnitRunner])
class NodesSuite extends FunSuite {
class NodesSuite extends AnyFunSuite {

val localUrlRoot = "http://localhost:8080"
val urlRoot = sys.env.getOrElse("EXCHANGE_URL_ROOT", localUrlRoot)
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/PatternsSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import org.json4s._
import org.json4s.jackson.JsonMethods._
import org.json4s.native.Serialization.write
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.funsuite.AnyFunSuite
import org.scalatestplus.junit.JUnitRunner

import scala.collection.immutable._
import scalaj.http._
Expand All @@ -24,7 +24,7 @@ import scalaj.http._
* clear and detailed tutorial of FunSuite: http://doc.scalatest.org/1.9.1/index.html#org.scalatest.FunSuite
*/
@RunWith(classOf[JUnitRunner])
class PatternsSuite extends FunSuite {
class PatternsSuite extends AnyFunSuite {

val localUrlRoot = "http://localhost:8080"
val urlRoot = sys.env.getOrElse("EXCHANGE_URL_ROOT", localUrlRoot)
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/PerfSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package exchangeapi

import org.json4s._
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.funsuite.AnyFunSuite
import org.scalatestplus.junit.JUnitRunner

import scalaj.http._
import com.horizon.exchangeapi._
Expand All @@ -13,7 +13,7 @@ import org.json4s.native.Serialization.write

/** Run some performance tests on the exchange. */
@RunWith(classOf[JUnitRunner])
class PerfSuite extends FunSuite {
class PerfSuite extends AnyFunSuite {

val urlRoot = sys.env.getOrElse("EXCHANGE_URL_ROOT", "http://localhost:8080")
val URL = urlRoot+"/v1"
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/ServicesSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import org.json4s._
import org.json4s.jackson.JsonMethods._
import org.json4s.native.Serialization.write
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.funsuite.AnyFunSuite
import org.scalatestplus.junit.JUnitRunner

import scala.collection.immutable._
import scalaj.http._
Expand All @@ -23,7 +23,7 @@ import scalaj.http._
* clear and detailed tutorial of FunSuite: http://doc.scalatest.org/1.9.1/index.html#org.scalatest.FunSuite
*/
@RunWith(classOf[JUnitRunner])
class ServicesSuite extends FunSuite {
class ServicesSuite extends AnyFunSuite {

val localUrlRoot = "http://localhost:8080"
val urlRoot = sys.env.getOrElse("EXCHANGE_URL_ROOT", localUrlRoot)
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/SlickSuite.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exchangeapi

import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.funsuite.AnyFunSuite
import org.scalatestplus.junit.JUnitRunner

//someday: use : http://blog.abhinav.ca/blog/2014/09/08/unit-testing-futures-with-scalatest/ to add slick unit tests

Expand All @@ -12,7 +12,7 @@ import org.scalatest.junit.JUnitRunner
* clear and detailed tutorial of FunSuite: http://doc.scalatest.org/1.9.1/index.html#org.scalatest.FunSuite
*/
@RunWith(classOf[JUnitRunner])
class SlickSuite extends FunSuite {
class SlickSuite extends AnyFunSuite {

ignore("listUsers") {
// val cpds = new ComboPooledDataSource
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/UsersSuite.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exchangeapi

import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatestplus.junit.JUnitRunner
import scalaj.http._
import org.json4s._
import org.json4s.jackson.JsonMethods._
Expand All @@ -21,7 +21,7 @@ import scala.collection.immutable._
* clear and detailed tutorial of FunSuite: http://doc.scalatest.org/1.9.1/index.html#org.scalatest.FunSuite
*/
@RunWith(classOf[JUnitRunner])
class UsersSuite extends FunSuite {
class UsersSuite extends AnyFunSuite {

val urlRoot = sys.env.getOrElse("EXCHANGE_URL_ROOT", "http://localhost:8080")
val ACCEPT = ("Accept", "application/json")
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/exchangeapi/VersionSuite.scala
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package exchangeapi

import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatestplus.junit.JUnitRunner
import com.horizon.exchangeapi._

/**
* Tests for the Version and VersionRange case classes
*/
@RunWith(classOf[JUnitRunner])
class VersionSuite extends FunSuite {
class VersionSuite extends AnyFunSuite {
test("Version tests") {
assert(Version("1.2.3").isValid)
assert(Version("infinity").isValid)
Expand Down

0 comments on commit ea2c0f2

Please sign in to comment.