public bool CanUseOnMagic(ICurrency currency) { var item = _factory.GetNormal(); AffixManager affixManager = CreateAffixManager(item.ItemBase); _transmutation.Execute(item, affixManager); return(currency.Execute(item, affixManager)); }
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); }
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); }
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); }
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); }