示例#1
0
        public void AddingASecondEnemyAppendsADifferentOneToTheList()
        {
            var aberration    = new CreatureType("Aberration");
            var dragon        = new CreatureType("Dragon");
            var creatureTypes = new CreatureType[] { aberration, dragon };
            var ctGateway     = EntityGateway <CreatureType> .LoadFromList(creatureTypes);

            var configureStep = new SelectFavoredEnemy(ctGateway);
            var character     = new CharacterSheet(CharacterStrategy.Default());

            configureStep.ExecuteStep(character);
            configureStep.ExecuteStep(character);

            var favEnemy = character.Get <FavoredEnemy>();

            Assert.Contains(aberration, favEnemy.CreatureTypes);
            Assert.Contains(dragon, favEnemy.CreatureTypes);
        }
示例#2
0
        public void ChooseFromFavoredEnemyList()
        {
            var aberration = new CreatureType("Aberration");
            var ctGateway  = EntityGateway <CreatureType> .LoadWithSingleItem(aberration);

            var configureStep = new SelectFavoredEnemy(ctGateway);
            var character     = new CharacterSheet(CharacterStrategy.Default());

            configureStep.ExecuteStep(character);

            var favEnemy = character.Get <FavoredEnemy>();

            Assert.Contains(aberration, favEnemy.CreatureTypes);
        }