public void AllStaffs() { var staffs = StaffConstants.GetAllStaffs(); Assert.That(staffs, Contains.Item(StaffConstants.Abjuration)); Assert.That(staffs, Contains.Item(StaffConstants.Charming)); Assert.That(staffs, Contains.Item(StaffConstants.Conjuration)); Assert.That(staffs, Contains.Item(StaffConstants.Defense)); Assert.That(staffs, Contains.Item(StaffConstants.Divination)); Assert.That(staffs, Contains.Item(StaffConstants.EarthAndStone)); Assert.That(staffs, Contains.Item(StaffConstants.Enchantment)); Assert.That(staffs, Contains.Item(StaffConstants.Evocation)); Assert.That(staffs, Contains.Item(StaffConstants.Fire)); Assert.That(staffs, Contains.Item(StaffConstants.Frost)); Assert.That(staffs, Contains.Item(StaffConstants.Healing)); Assert.That(staffs, Contains.Item(StaffConstants.Illumination)); Assert.That(staffs, Contains.Item(StaffConstants.Illusion)); Assert.That(staffs, Contains.Item(StaffConstants.Life)); Assert.That(staffs, Contains.Item(StaffConstants.Necromancy)); Assert.That(staffs, Contains.Item(StaffConstants.Passage)); Assert.That(staffs, Contains.Item(StaffConstants.Power)); Assert.That(staffs, Contains.Item(StaffConstants.SizeAlteration)); Assert.That(staffs, Contains.Item(StaffConstants.SwarmingInsects)); Assert.That(staffs, Contains.Item(StaffConstants.Transmutation)); Assert.That(staffs, Contains.Item(StaffConstants.Woodlands)); Assert.That(staffs.Count(), Is.EqualTo(21)); }
private string GetStaffName(string itemName) { var staffs = StaffConstants.GetAllStaffs(); if (staffs.Contains(itemName)) { return(itemName); } var staffFromBaseName = collectionsSelector.FindCollectionOf(TableNameConstants.Collections.Set.ItemGroups, itemName, staffs.ToArray()); return(staffFromBaseName); }
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(StaffConstants.GetAllStaffs()); }