Пример #1
0
        public void CampActionValidInWilderness()
        {
            actor.Enter <Location>(wilderness);
            var action = new CampAction(actor);

            Assert.AreEqual(ActionOutcome.Progress(), action.Execute(dryRun: true));
        }
Пример #2
0
        public void CannotCampOutsideOfWilderness(bool dryRun)
        {
            actor.Enter <Location>(building);
            var action = new CampAction(actor);

            Assert.AreEqual(ActionStatus.Failed, action.Execute(dryRun).Status);
        }
Пример #3
0
        public void CanCampInWilderness()
        {
            actor.Enter <Location>(wilderness);
            var action = new CampAction(actor);

            for (int i = 0; i < 10; i++)
            {
                Assert.AreEqual(ActionOutcome.Progress(), action.Execute(dryRun: false));
            }
            Assert.IsFalse(wilderness.Get <Wilderness>().HasCampsite);
            Assert.AreEqual(ActionOutcome.Success(), action.Execute(dryRun: false));
            Assert.IsTrue(wilderness.Get <Wilderness>().HasCampsite);
        }