=pro #3759 Changed to using non-deprecated ScalaTest Matchers

This commit is contained in:
Björn Antonsson 2013-12-17 14:25:56 +01:00
parent b8c7d7badd
commit 003609c9c5
246 changed files with 2822 additions and 2822 deletions

View file

@ -5,7 +5,7 @@ import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll
import org.scalatest.WordSpecLike
import org.scalatest.matchers.MustMatchers
import org.scalatest.Matchers
import akka.actor.PoisonPill
import akka.actor.Props
import akka.actor.RootActorPath
@ -59,7 +59,7 @@ class StatsSampleSingleMasterSpecMultiJvmNode2 extends StatsSampleSingleMasterSp
class StatsSampleSingleMasterSpecMultiJvmNode3 extends StatsSampleSingleMasterSpec
abstract class StatsSampleSingleMasterSpec extends MultiNodeSpec(StatsSampleSingleMasterSpecConfig)
with WordSpecLike with MustMatchers with BeforeAndAfterAll with ImplicitSender {
with WordSpecLike with Matchers with BeforeAndAfterAll with ImplicitSender {
import StatsSampleSingleMasterSpecConfig._
@ -80,7 +80,7 @@ abstract class StatsSampleSingleMasterSpec extends MultiNodeSpec(StatsSampleSing
Cluster(system) join firstAddress
receiveN(3).collect { case MemberUp(m) => m.address }.toSet must be(
receiveN(3).collect { case MemberUp(m) => m.address }.toSet should be(
Set(firstAddress, secondAddress, thirdAddress))
Cluster(system).unsubscribe(testActor)
@ -103,7 +103,7 @@ abstract class StatsSampleSingleMasterSpec extends MultiNodeSpec(StatsSampleSing
// service and worker nodes might not be up yet
awaitAssert {
facade ! new StatsJob("this is the text that will be analyzed")
expectMsgType[StatsResult](1.second).getMeanWordLength must be(3.875 plusOrMinus 0.001)
expectMsgType[StatsResult](1.second).getMeanWordLength should be(3.875 +- 0.001)
}
testConductor.enter("done")

View file

@ -15,7 +15,7 @@ import akka.remote.testkit.MultiNodeConfig
import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll
import org.scalatest.WordSpecLike
import org.scalatest.matchers.MustMatchers
import org.scalatest.Matchers
import akka.remote.testkit.MultiNodeSpec
import akka.testkit.ImplicitSender
@ -57,7 +57,7 @@ class StatsSampleSpecMultiJvmNode2 extends StatsSampleSpec
class StatsSampleSpecMultiJvmNode3 extends StatsSampleSpec
abstract class StatsSampleSpec extends MultiNodeSpec(StatsSampleSpecConfig)
with WordSpecLike with MustMatchers with BeforeAndAfterAll
with WordSpecLike with Matchers with BeforeAndAfterAll
with ImplicitSender {
import StatsSampleSpecConfig._
@ -83,7 +83,7 @@ abstract class StatsSampleSpec extends MultiNodeSpec(StatsSampleSpecConfig)
system.actorOf(Props[StatsWorker], "statsWorker")
system.actorOf(Props[StatsService], "statsService")
receiveN(3).collect { case MemberUp(m) => m.address }.toSet must be(
receiveN(3).collect { case MemberUp(m) => m.address }.toSet should be(
Set(firstAddress, secondAddress, thirdAddress))
Cluster(system).unsubscribe(testActor)
@ -105,7 +105,7 @@ abstract class StatsSampleSpec extends MultiNodeSpec(StatsSampleSpecConfig)
// first attempts might fail because worker actors not started yet
awaitAssert {
service ! new StatsJob("this is the text that will be analyzed")
expectMsgType[StatsResult](1.second).getMeanWordLength must be(3.875 plusOrMinus 0.001)
expectMsgType[StatsResult](1.second).getMeanWordLength should be(3.875 +- 0.001)
}
}
//#test-statsService

View file

@ -7,7 +7,7 @@ import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll
import org.scalatest.WordSpecLike
import org.scalatest.matchers.MustMatchers
import org.scalatest.Matchers
import akka.actor.Props
import akka.cluster.Cluster
@ -49,7 +49,7 @@ class TransformationSampleSpecMultiJvmNode4 extends TransformationSampleSpec
class TransformationSampleSpecMultiJvmNode5 extends TransformationSampleSpec
abstract class TransformationSampleSpec extends MultiNodeSpec(TransformationSampleSpecConfig)
with WordSpecLike with MustMatchers with BeforeAndAfterAll with ImplicitSender {
with WordSpecLike with Matchers with BeforeAndAfterAll with ImplicitSender {
import TransformationSampleSpecConfig._
@ -120,7 +120,7 @@ abstract class TransformationSampleSpec extends MultiNodeSpec(TransformationSamp
// backends might not have registered initially
awaitAssert {
transformationFrontend ! new TransformationJob("hello")
expectMsgType[TransformationResult](1.second).getText must be("HELLO")
expectMsgType[TransformationResult](1.second).getText should be("HELLO")
}
}