Пример #1
0
        public void TestGenerate()
        {
            var keys = new List <decimal>()
            {
                0.16m, 0.2m, 0.3m, 0.4m, 0.5m, 0.6m, 0.7m, 0.8m
            };
            var expectValue = keys.Select(b => ItemPool.PotionBaseList.GetNearValue(b)).ToList().Select(b => b != null ? b() : null).ToList();
            var actual      = keys.Select(b => ItemPool.DropItem(0.5m, b)).ToList();

            for (var i = 0; i < keys.Count; i++)
            {
                if (expectValue != null)
                {
                    continue;
                }
                Assert.AreEqual(expectValue[i].ItemName, actual[i].ItemName);
            }
        }