Exemplo n.º 1
0
        public async Task GenerateAtLevelAsync_Named_GetPowerFromSelector()
        {
            mockCollectionSelector
            .Setup(s => s.SelectFrom(TableNameConstants.Collections.Set.PowerGroups, "item name"))
            .Returns(new[] { PowerConstants.Mundane, "power", "more power", "wrong power" });

            await itemsGenerator.GenerateAtLevelAsync(96, "item type", "item name");

            var expectedTableName = string.Format(TableNameConstants.Percentiles.Formattable.LevelXItems, 96);

            mockTypeAndAmountPercentileSelector.Verify(p => p.SelectFrom(expectedTableName), Times.Once);
        }
Exemplo n.º 2
0
        private async Task GenerateAndAssertNamedItemAtLevelAsync(string itemType)
        {
            var level    = GetNewLevel();
            var itemName = GetRandomItemName(itemType);

            var item = await itemsGenerator.GenerateAtLevelAsync(level, itemType, itemName);

            itemVerifier.AssertItem(item);
        }