mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
* propagation of the ask pattern into the unique number actor * TaskWorkflow as a replacement for TaskResolver; includes working tests * AvailabilityPolicy has been changed slightly; number source restriction mechanic has been completely removed * TaskResolver is gone and done and TaskWorkflow replaces it * number pool variety * every zone gets a custom tailored 'environment' number pool, as well as all other number pools; uns involves many more static functions and hard-defined variables * repairs to uns and guidtask tests; worked uns into unops, an actorless version, but did not integrate into server * shuffled around files in the guid package, causing import threshing; wrote extensive comments; repaired tests; classes related to the old unique number system have been removed * created straightforward tasks; simplified number pool actor calls; repaired tests due to modifications to generic pool * bad merge recovery
24 lines
690 B
Scala
24 lines
690 B
Scala
// Copyright (c) 2017 PSForever
|
|
package objects.guidtask
|
|
|
|
import base.ActorTest
|
|
import net.psforever.objects._
|
|
import net.psforever.objects.guid.{GUIDTask, TaskBundle, TaskWorkflow}
|
|
|
|
import scala.concurrent.duration._
|
|
|
|
class GUIDTaskRegisterAmmoTest extends ActorTest {
|
|
"RegisterEquipment -> RegisterObjectTask" in {
|
|
val (_, uns, probe) = GUIDTaskTest.CommonTestSetup
|
|
val obj = AmmoBox(GlobalDefinitions.energy_cell)
|
|
|
|
assert(!obj.HasGUID)
|
|
TaskWorkflow.execute(TaskBundle(
|
|
new GUIDTaskTest.RegisterTestTask(probe.ref),
|
|
GUIDTask.registerEquipment(uns, obj)
|
|
))
|
|
probe.expectMsg(5.second, scala.util.Success(true))
|
|
assert(obj.HasGUID)
|
|
}
|
|
}
|