Exemplo n.º 1
0
        public void DropTest()
        {
            GameObject    place = new GameObject();
            PhysicalActor actor = new PhysicalActor(new FakeBody(), place);
            GameObject    prop = new GameObject(actor);
            ActionOutcome outcome = new Drop {
                Actor = actor, Target = prop
            }.Attempt();

            Assert.IsTrue(outcome.Success());
            Assert.AreEqual(place, prop.Location);
        }
Exemplo n.º 2
0
        public void TakeTest()
        {
            GameObject place = new GameObject();
            GameObject prop  = new GameObject(place);

            prop.AddTrait(new InventoryItem(weight: 1));
            PhysicalActor actor = new PhysicalActor(new FakeBody(), place);
            Take          take  = new Take {
                Actor = actor, Target = prop
            };
            ActionOutcome outcome = take.Attempt();

            Assert.IsTrue(outcome.Success());
            Assert.AreEqual(actor, prop.Location);
        }