mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-02-21 07:33:39 +00:00
* resolved merge of multi-PR-merge master branch supporting gating branch * making adjustments to the distinctions between building map id and building GUID, where necessary, to assist with the loading process * custom spawn tube definitions for the sanctuary VT_building's
35 lines
1,007 B
Scala
35 lines
1,007 B
Scala
// Copyright (c) 2017 PSForever
|
|
package objects
|
|
|
|
import akka.actor.{ActorRef, Props}
|
|
import base.ActorTest
|
|
import net.psforever.objects.GlobalDefinitions
|
|
import net.psforever.objects.serverobject.tube.{SpawnTube, SpawnTubeControl, SpawnTubeDefinition}
|
|
import org.specs2.mutable.Specification
|
|
|
|
class SpawnTubeTest extends Specification {
|
|
"SpawnTubeDefinition" should {
|
|
"define" in {
|
|
val obj = new SpawnTubeDefinition(49)
|
|
obj.ObjectId mustEqual 49
|
|
}
|
|
}
|
|
|
|
"SpawnTube" should {
|
|
"construct" in {
|
|
val obj = SpawnTube(GlobalDefinitions.ams_respawn_tube)
|
|
obj.Actor mustEqual ActorRef.noSender
|
|
obj.Definition mustEqual GlobalDefinitions.ams_respawn_tube
|
|
}
|
|
}
|
|
}
|
|
|
|
class SpawnTubeControlTest extends ActorTest {
|
|
"SpawnTubeControl" should {
|
|
"construct" in {
|
|
val obj = SpawnTube(GlobalDefinitions.ams_respawn_tube)
|
|
obj.Actor = system.actorOf(Props(classOf[SpawnTubeControl], obj), "spawn-tube")
|
|
assert(obj.Actor != ActorRef.noSender)
|
|
}
|
|
}
|
|
}
|