public CombatGenerator(IArmorClassGenerator armorClassGenerator, IHitPointsGenerator hitPointsGenerator, ISavingThrowsGenerator savingThrowsGenerator, IAdjustmentsSelector adjustmentsSelector, ICollectionsSelector collectionsSelector) { this.armorClassGenerator = armorClassGenerator; this.hitPointsGenerator = hitPointsGenerator; this.savingThrowsGenerator = savingThrowsGenerator; this.adjustmentsSelector = adjustmentsSelector; this.collectionsSelector = collectionsSelector; }
public void Setup() { mockCollectionsSelector = new Mock<ICollectionsSelector>(); savingThrowsGenerator = new SavingThrowsGenerator(mockCollectionsSelector.Object); characterClass = new CharacterClass(); feats = new List<Feat>(); stats = new Dictionary<string, Stat>(); allSaveFeats = new List<string>(); reflexSaveFeats = new List<string>(); fortitudeSaveFeats = new List<string>(); willSaveFeats = new List<string>(); strongFortitude = new List<string>(); strongReflex = new List<string>(); strongWill = new List<string>(); stats[StatConstants.Constitution] = new Stat(StatConstants.Constitution); stats[StatConstants.Dexterity] = new Stat(StatConstants.Dexterity); stats[StatConstants.Wisdom] = new Stat(StatConstants.Wisdom); characterClass.Name = "class name"; characterClass.Level = 600; allSaveFeats.Add("other feat"); reflexSaveFeats.Add("other feat"); fortitudeSaveFeats.Add("other feat"); willSaveFeats.Add("other feat"); mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.FeatGroups, GroupConstants.SavingThrows)) .Returns(allSaveFeats); mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.FeatGroups, SavingThrowConstants.Fortitude)) .Returns(fortitudeSaveFeats); mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.FeatGroups, SavingThrowConstants.Reflex)) .Returns(reflexSaveFeats); mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.FeatGroups, SavingThrowConstants.Will)) .Returns(willSaveFeats); mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.ClassNameGroups, SavingThrowConstants.Fortitude)) .Returns(strongFortitude); mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.ClassNameGroups, SavingThrowConstants.Reflex)) .Returns(strongReflex); mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.ClassNameGroups, SavingThrowConstants.Will)) .Returns(strongWill); }