public bool CanUseOnMagic(ICurrency currency)
        {
            var          item         = _factory.GetNormal();
            AffixManager affixManager = CreateAffixManager(item.ItemBase);

            _transmutation.Execute(item, affixManager);
            return(currency.Execute(item, affixManager));
        }
示例#2
0
        public void AnullmentMagicTest()
        {
            var          item         = _factory.GetNormal();
            AffixManager affixManager = _currencyTestHelper.CreateAffixManager(item.ItemBase);

            _transmutation.Execute(item, affixManager);
            var oldAffixCount = item.Prefixes.Count + item.Suffixes.Count;
            var result        = _anullment.Execute(item, affixManager);

            Assert.IsTrue(result);
            var newAffixCount = item.Prefixes.Count + item.Suffixes.Count;

            Assert.AreEqual(oldAffixCount, newAffixCount + 1);
        }
示例#3
0
        public void VaalMagicTest()
        {
            var          item         = _factory.GetNormal();
            AffixManager affixManager = _currencyTestHelper.CreateAffixManager(item.ItemBase);

            _transmutation.Execute(item, affixManager);
            var result = _vaal.Execute(item, affixManager);

            Assert.IsTrue(result);
            Assert.IsTrue(item.Corrupted);
        }
        public void TransmutationSuccessTest()
        {
            var          item         = _factory.GetNormal();
            AffixManager affixManager = _currencyTestHelper.CreateAffixManager(item.ItemBase);

            var result = _transmutation.Execute(item, affixManager);

            Assert.IsTrue(result);
            Assert.IsTrue(item.Suffixes.Count + item.Prefixes.Count >= 1);
            Assert.AreEqual(EquipmentRarity.Magic, item.Rarity);
        }
示例#5
0
        public void RegalSuccessTest()
        {
            var          item         = _factory.GetNormal();
            AffixManager affixManager = _currencyTestHelper.CreateAffixManager(item.ItemBase);

            _transmutation.Execute(item, affixManager);
            var previousAffixCount = item.Prefixes.Count + item.Suffixes.Count;

            var result = _regal.Execute(item, affixManager);

            Assert.IsTrue(result);
            var currentAffixCount = item.Prefixes.Count + item.Suffixes.Count;

            Assert.AreEqual(previousAffixCount + 1, currentAffixCount);
            Assert.AreEqual(EquipmentRarity.Rare, item.Rarity);
        }
示例#6
0
        public void AugmentationSuccessTest()
        {
            var          item         = _factory.GetNormal();
            AffixManager affixManager = _currencyTestHelper.CreateAffixManager(item.ItemBase);

            _transmutation.Execute(item, affixManager);
            if (item.Prefixes.Count + item.Suffixes.Count == 2)
            {
                _anullment.Execute(item, affixManager);
            }
            Assert.AreEqual(1, item.Prefixes.Count + item.Suffixes.Count);

            var result = _augmentation.Execute(item, affixManager);

            Assert.IsTrue(result);
            Assert.AreEqual(1, item.Prefixes.Count);
            Assert.AreEqual(1, item.Suffixes.Count);
        }