fixed layout
This commit is contained in:
parent
a36411cfb6
commit
2bafccb1ce
1 changed files with 8 additions and 10 deletions
|
|
@ -65,22 +65,20 @@ class ExecutorBasedEventDrivenDispatcherActorsTest extends JUnitSuite with MustM
|
|||
trait ActorTestUtil {
|
||||
def handle[T](actors: Actor*)(test: => T): T = {
|
||||
for (a <- actors) a.start
|
||||
try
|
||||
{
|
||||
try {
|
||||
test
|
||||
}
|
||||
finally
|
||||
{
|
||||
for (a <- actors) a.stop
|
||||
}
|
||||
finally {
|
||||
for (a <- actors) a.stop
|
||||
}
|
||||
}
|
||||
|
||||
def verify(actor: TestActor): Unit = handle(actor)
|
||||
{actor.test}
|
||||
def verify(actor: TestActor): Unit = handle(actor) {
|
||||
actor.test
|
||||
}
|
||||
}
|
||||
|
||||
abstract class TestActor extends Actor with ActorTestUtil
|
||||
{
|
||||
abstract class TestActor extends Actor with ActorTestUtil {
|
||||
def test: Unit
|
||||
|
||||
def receive = {case _ =>}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue