Exemplo n.º 1
0
            public void Returns_true_if_player_passes_condition()
            {
                var choiceInfo  = new CheckChoiceEventInfo();
                var choiceEvent = new ChoiceEvent(choiceInfo);
                var firstChoice = choiceEvent.Choices[0];

                Assert.IsTrue(choiceEvent.Choose(firstChoice, new DummyContext()));
                Assert.AreEqual(choiceEvent.CurrentChoice, firstChoice);
            }
Exemplo n.º 2
0
            public void Returns_false_if_player_cannot_choose_it()
            {
                var choiceInfo        = new FailChoiceEventInfo();
                var choiceEvent       = new ChoiceEvent(choiceInfo);
                var unavailableChoice = choiceEvent.Choices[0];

                Assert.IsFalse(choiceEvent.Choose(unavailableChoice, new DummyContext()));
                Assert.IsNull(choiceEvent.CurrentChoice);
            }