public PercentileSelectorStringReplacementDecorator( IPercentileSelector innerSelector, IReplacementSelector replacementSelector) { this.innerSelector = innerSelector; this.replacementSelector = replacementSelector; }
public PotionGenerator( ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, ICollectionSelector collectionSelector, IReplacementSelector replacementSelector) { this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector; this.collectionSelector = collectionSelector; this.replacementSelector = replacementSelector; }
public MundaneWeaponGenerator( ITreasurePercentileSelector percentileSelector, ICollectionSelector collectionsSelector, Dice dice, IWeaponDataSelector weaponDataSelector, IReplacementSelector replacementSelector) { this.percentileSelector = percentileSelector; this.collectionsSelector = collectionsSelector; this.dice = dice; this.weaponDataSelector = weaponDataSelector; this.replacementSelector = replacementSelector; }
public RingGenerator( ICollectionSelector collectionsSelector, ISpellGenerator spellGenerator, IChargesGenerator chargesGenerator, ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, IReplacementSelector replacementSelector) { this.collectionsSelector = collectionsSelector; this.spellGenerator = spellGenerator; this.chargesGenerator = chargesGenerator; this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector; this.replacementSelector = replacementSelector; }
public SpecificGearGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, ICollectionSelector collectionsSelector, IChargesGenerator chargesGenerator, ITreasurePercentileSelector percentileSelector, ISpellGenerator spellGenerator, ISpecialAbilitiesGenerator specialAbilitiesGenerator, JustInTimeFactory justInTimeFactory, IReplacementSelector replacementSelector) { this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector; this.collectionsSelector = collectionsSelector; this.chargesGenerator = chargesGenerator; this.percentileSelector = percentileSelector; this.spellGenerator = spellGenerator; this.specialAbilitiesGenerator = specialAbilitiesGenerator; this.justInTimeFactory = justInTimeFactory; this.replacementSelector = replacementSelector; }
public void Setup() { mockCollectionSelector = new Mock <ICollectionSelector>(); replacements = new Dictionary <string, IEnumerable <string> >(); replacements["FIRST"] = new[] { "1st", "the first" }; replacements["SECOND"] = new[] { "2nd", "the second" }; replacements["SINGLE"] = new[] { "the only one" }; mockCollectionSelector .Setup(s => s.SelectAllFrom(TableNameConstants.Collections.Set.ReplacementStrings)) .Returns(replacements); var index = 0; mockCollectionSelector .Setup(s => s.SelectRandomFrom(It.IsAny <IEnumerable <string> >())) .Returns((IEnumerable <string> c) => c.ElementAt(index++ % c.Count())); replacementSelector = new ReplacementSelector(mockCollectionSelector.Object); }
public void Setup() { typeAndAmountPercentileSelector = GetNewInstanceOf <ITypeAndAmountPercentileSelector>(); replacementSelector = GetNewInstanceOf <IReplacementSelector>(); percentileSelector = GetNewInstanceOf <IPercentileSelector>(); }