akka/akka — pull request #792 by cessationoftime (2012-10-08 17:33:49+00:00)
Title: modify ifNode(), runOn() and nodeConfig() in MultiNodeSpec API

These changes alter MultiNodeSpec to allow one to write certain things a little more concisely.

Instead of:

```scala
nodeConfig(central, amqpWorker)
nodeConfig(worker1, amqpWorker)
nodeConfig(worker2, amqpWorker)
nodeConfig(applet1, amqpApplet)
nodeConfig(applet1, amqpApplet)
```

One may write:

```scala
nodeConfig(central,worker1,worker2)(amqpWorker)
nodeConfig(applet1,applet2)(amqpApplet)
```

---------------------------------------

Instead of:

```scala
runOn(send) {
system.settings.config.getString("akka.remote.netty.port") must be("1991")
}

runOn(receive) {
system.settings.config.getString("akka.remote.netty.port") must be("1992")
}
```

One may write:

```scala
runOn(send -> "1991", receive -> "1992") { port =>
system.settings.config.getString("akka.remote.netty.port") must be(port)
}
```

---------------------

Instead of (only specifying 2 different ports):

```scala
ifNode(send, receive) {
system.settings.config.getString("akka.remote.netty.port") must be("1991")
} {
system.settings.config.getString("akka.remote.netty.port") must be("1993")
}
```

One may write this (and specify 3 different ports):

```scala
ifNode(send -> "1991", receive -> "1992"){ port =>
system.settings.config.getString("akka.remote.netty.port") must be(port)
} {
system.settings.config.getString("akka.remote.netty.port") must be("1993")
}
```

Or write:
```scala
ifNodeOrElse(send -> "1991", receive -> "1992")("1993"){ port =>
system.settings.config.getString("akka.remote.netty.port") must be(port)
}
```