示例#1
0
 public FeatsGenerator(ICollectionSelector collectionsSelector, IFeatsSelector featsSelector, IFeatFocusGenerator featFocusGenerator, Dice dice)
 {
     this.collectionsSelector = collectionsSelector;
     this.featsSelector       = featsSelector;
     this.featFocusGenerator  = featFocusGenerator;
     this.dice = dice;
 }
 public AdditionalFeatsGenerator(ICollectionsSelector collectionsSelector, IFeatsSelector featsSelector, IFeatFocusGenerator featFocusGenerator, IAdjustmentsSelector adjustmentsSelector)
 {
     this.collectionsSelector = collectionsSelector;
     this.featsSelector = featsSelector;
     this.featFocusGenerator = featFocusGenerator;
     this.adjustmentsSelector = adjustmentsSelector;
 }
 public ClassFeatsGenerator(IFeatsSelector featsSelector, IFeatFocusGenerator featFocusGenerator, ICollectionsSelector collectionsSelector)
 {
     this.featsSelector = featsSelector;
     this.featFocusGenerator = featFocusGenerator;
     this.collectionsSelector = collectionsSelector;
 }
        public void Setup()
        {
            mockCollectionsSelector = new Mock<ICollectionsSelector>();
            featFocusGenerator = new FeatFocusGenerator(mockCollectionsSelector.Object);
            requiredFeats = new List<RequiredFeatSelection>();
            otherFeats = new List<Feat>();
            characterClass = new CharacterClass();
            skills = new Dictionary<string, Skill>();
            focusTypes = new Dictionary<string, IEnumerable<string>>();

            characterClass.Name = "class name";
            mockCollectionsSelector.Setup(s => s.SelectAllFrom(TableNameConstants.Set.Collection.FeatFoci)).Returns(focusTypes);
            mockCollectionsSelector.Setup(s => s.SelectRandomFrom(It.IsAny<IEnumerable<string>>())).Returns((IEnumerable<string> c) => c.First());
        }