public void AllAlchemicalItems() { var alchemicalItems = AlchemicalItemConstants.GetAllAlchemicalItems(); Assert.That(alchemicalItems, Contains.Item(AlchemicalItemConstants.AlchemistsFire)); Assert.That(alchemicalItems, Contains.Item(AlchemicalItemConstants.Acid)); Assert.That(alchemicalItems, Contains.Item(AlchemicalItemConstants.Smokestick)); Assert.That(alchemicalItems, Contains.Item(AlchemicalItemConstants.HolyWater)); Assert.That(alchemicalItems, Contains.Item(AlchemicalItemConstants.Antitoxin)); Assert.That(alchemicalItems, Contains.Item(AlchemicalItemConstants.EverburningTorch)); Assert.That(alchemicalItems, Contains.Item(AlchemicalItemConstants.TanglefootBag)); Assert.That(alchemicalItems, Contains.Item(AlchemicalItemConstants.Thunderstone)); Assert.That(alchemicalItems.Count(), Is.EqualTo(8)); }
private string GetRandomItemName(string itemType) { var itemNames = Enumerable.Empty <string>(); switch (itemType) { case ItemTypeConstants.AlchemicalItem: itemNames = AlchemicalItemConstants.GetAllAlchemicalItems(); break; case ItemTypeConstants.Armor: itemNames = ArmorConstants.GetAllArmorsAndShields(true); break; case ItemTypeConstants.Potion: itemNames = PotionConstants.GetAllPotions(true); break; case ItemTypeConstants.Ring: itemNames = RingConstants.GetAllRings(); break; case ItemTypeConstants.Rod: itemNames = RodConstants.GetAllRods(); break; case ItemTypeConstants.Scroll: itemNames = new[] { $"Scroll {Guid.NewGuid()}" }; break; case ItemTypeConstants.Staff: itemNames = StaffConstants.GetAllStaffs(); break; case ItemTypeConstants.Tool: itemNames = ToolConstants.GetAllTools(); break; case ItemTypeConstants.Wand: itemNames = new[] { $"Wand {Guid.NewGuid()}" }; break; case ItemTypeConstants.Weapon: itemNames = WeaponConstants.GetAllWeapons(true, true); break; case ItemTypeConstants.WondrousItem: itemNames = WondrousItemConstants.GetAllWondrousItems(); break; } var itemName = collectionSelector.SelectRandomFrom(itemNames); return(itemName); }
protected override IEnumerable <string> GetItemNames() { return(AlchemicalItemConstants.GetAllAlchemicalItems()); }