private void StockShop() { var wandBuilder = new WandCreator(); Repeat.Times(100, () => this.inventory.Add(wandBuilder.Process())); var potionCreator = new PotionCreator(); Repeat.Times(100, () => this.inventory.Add(potionCreator.Process())); }
public void WandsGetMoreExpensiveWithLevels(int level, int expectedValue) { var spellList = SpellList.CreateForTesting("wizard"); spellList.Add(level, "Cure Light Wounds"); var cure = new Spell("Cure Light Wounds", "healing"); var spellGateway = EntityGateway <Spell> .LoadWithSingleItem(cure); var spellListGateway = EntityGateway <SpellList> .LoadWithSingleItem(spellList); var createwands = new WandCreator(spellGateway, spellListGateway); var wand = createwands.Process(); Assert.Equal(expectedValue, wand.Value); }
public void WandsUtilizeAvailableListsToMakeWandsThatMakeSense() { var spellList = SpellList.CreateForTesting("wizard"); spellList.Add(1, "Cure Light Wounds"); var cure = new Spell("Cure Light Wounds", "healing"); var spellGateway = EntityGateway <Spell> .LoadWithSingleItem(cure); var spellListGateway = EntityGateway <SpellList> .LoadWithSingleItem(spellList); var createwands = new WandCreator(spellGateway, spellListGateway); var wand = createwands.Process(); Assert.Equal(cure, wand.Spell); Assert.Equal(50, wand.Charges); Assert.Equal(75000, wand.Value); }