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); }
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); }