public DungeonGenerator(IAreaPercentileSelector areaPercentileSelector, IAreaGeneratorFactory areaGeneratorFactory, IEncounterGenerator encounterGenerator, ITrapGenerator trapGenerator, IPercentileSelector percentileSelector, AreaGenerator hallGenerator) { this.areaGeneratorFactory = areaGeneratorFactory; this.areaPercentileSelector = areaPercentileSelector; this.encounterGenerator = encounterGenerator; this.trapGenerator = trapGenerator; this.percentileSelector = percentileSelector; this.hallGenerator = hallGenerator; }
public void Setup() { mockAreaPercentileSelector = new Mock<IAreaPercentileSelector>(); trapGenerator = new TrapGenerator(mockAreaPercentileSelector.Object); selectedLowLevelTrap = new Area(); selectedMidLevelTrap = new Area(); selectedHighLevelTrap = new Area(); mockAreaPercentileSelector.Setup(s => s.SelectFrom(TableNameConstants.LowLevelTraps)).Returns(selectedLowLevelTrap); mockAreaPercentileSelector.Setup(s => s.SelectFrom(TableNameConstants.MidLevelTraps)).Returns(selectedMidLevelTrap); mockAreaPercentileSelector.Setup(s => s.SelectFrom(TableNameConstants.HighLevelTraps)).Returns(selectedHighLevelTrap); }