Switched newActor for actorOf

This commit is contained in:
Viktor Klang 2010-05-08 19:01:12 +02:00
parent ae6eb54ee9
commit 6b30bc8c4f
37 changed files with 160 additions and 160 deletions

View file

@ -20,7 +20,7 @@ trait CamelService extends Bootable with Logging {
import CamelContextManager._
private[camel] val consumerPublisher = newActor[ConsumerPublisher]
private[camel] val consumerPublisher = actorOf[ConsumerPublisher]
private[camel] val publishRequestor = actorOf(new PublishRequestor(consumerPublisher))
/**

View file

@ -79,7 +79,7 @@ class CamelServiceFeatureTest extends FeatureSpec with BeforeAndAfterAll with Gi
scenario("access an actor from the custom Camel route") {
given("a registered actor and a custom route to that actor")
val actor = newActor[TestActor].start
val actor = actorOf[TestActor].start
when("sending a a message to that route")
val response = CamelContextManager.template.requestBody("direct:custom-route-test-1", "msg3")

View file

@ -29,23 +29,23 @@ class PublishTest extends JUnitSuite {
import PublishTest._
@Test def shouldCreatePublishRequestList = {
val publish = Publish.forConsumers(List(newActor[ConsumeAnnotatedActor]))
val publish = Publish.forConsumers(List(actorOf[ConsumeAnnotatedActor]))
assert(publish === List(Publish("mock:test1", "test", false)))
}
@Test def shouldCreateSomePublishRequestWithActorId = {
val publish = Publish.forConsumer(newActor[ConsumeAnnotatedActor])
val publish = Publish.forConsumer(actorOf[ConsumeAnnotatedActor])
assert(publish === Some(Publish("mock:test1", "test", false)))
}
@Test def shouldCreateSomePublishRequestWithActorUuid = {
val ca = newActor[ConsumerActor]
val ca = actorOf[ConsumerActor]
val publish = Publish.forConsumer(ca)
assert(publish === Some(Publish("mock:test2", ca.uuid, true)))
}
@Test def shouldCreateNone = {
val publish = Publish.forConsumer(newActor[PlainActor])
val publish = Publish.forConsumer(actorOf[PlainActor])
assert(publish === None)
}
}