public void LinkIsZeroIfSocketGroupIsNull() { var item = new MockModdableItem(); var vm = ItemViewModel.CreateViewModel(item); Assert.AreEqual(0, vm.Link.Value); }
public void SynthesisedStatPropertyIsCheckedIfTrue() { var item = new MockModdableItem() { Synthesised = true }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.SynthesisedItem.Checked); }
public void SynthesisedStatIsAddedToStatsListIfTrue() { var item = new MockModdableItem() { Synthesised = true }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.ItemStats.Contains(vm.SynthesisedItem)); }
public void ElderStatPropertyIsCheckedIfTrue() { var item = new MockModdableItem() { Elder = true }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.ElderBase.Checked); }
public void ElderStatIsAddedToStatsListIfTrue() { var item = new MockModdableItem() { Elder = true }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.ItemStats.Contains(vm.ElderBase)); }
public void SynthesisedPropertyIsSetForModdableItems() { var item = new MockModdableItem() { Synthesised = true }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.SynthesisedItem.Value); }
public void ElderBaseIsSetForModdableItems() { var item = new MockModdableItem() { Elder = true }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.ElderBase.Value); }
public void SocketCountIsEqualToItemSocketCount() { var item = new MockModdableItem() { Sockets = SocketGroup.Parse("B B") }; var vm = ItemViewModel.CreateViewModel(item); Assert.AreEqual(2, vm.SocketCount.Value); }
public void LinkIsCheckedIfEqualTo6() { var item = new MockModdableItem() { Sockets = SocketGroup.Parse("B-B-B-B-B-B") }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.Link.Checked); }
public void FracturedFieldIsCheckedIfTrue() { var item = new MockModdableItem() { Fractured = true }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.FracturedItem.Checked); }
public void FracturedFieldIsIncludedInStatsListIfTrue() { var item = new MockModdableItem() { Fractured = true }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.ItemStats.Contains(vm.FracturedItem)); }
public void ModdableItemsNameIsSet() { var item = new MockModdableItem() { Name = "Foo" }; var vm = ItemViewModel.CreateViewModel(item); Assert.AreEqual(item.Name, vm.ItemName); }
public void ItemRarityIsSet() { var item = new MockModdableItem() { Rarity = Rarity.Rare }; var vm = ItemViewModel.CreateViewModel(item); Assert.AreEqual(Rarity.Rare, vm.ItemRarity); }
public void ItemTotalLifeIsCheckedIfGreaterThan39() { var item = new MockModdableItem() { TotalLife = 40 }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.TotalLife.Checked); }
public void ItemTotalLifeIsSet() { var item = new MockModdableItem() { TotalLife = 100 }; var vm = ItemViewModel.CreateViewModel(item); Assert.AreEqual(100, vm.TotalLife.Value); }
public void ItemTotalLifeIsAddedToStatsListIfGreaterThanZero() { var item = new MockModdableItem() { TotalLife = 100 }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.ItemStats.Contains(vm.TotalLife)); }
public void ItemTotalResistsIsAddedToStatsListIfGreaterThanZero() { var item = new MockModdableItem() { FireResistance = 5 }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.ItemStats.Contains(vm.TotalResistances)); }
public void ItemTotalResistsIsCheckedIfGreaterThan29() { var item = new MockModdableItem() { FireResistance = 30 }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.TotalResistances.Checked); }
public void LinkIsAddedToStatListIfValueIsGreaterThanZero() { var item = new MockModdableItem() { Sockets = SocketGroup.Parse("B") }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.ItemStats.Contains(vm.Link)); }
public void ItemTypeIsSet() { var item = new MockModdableItem() { Category = PoEItemType.Amulet }; var vm = ItemViewModel.CreateViewModel(item); Assert.AreEqual(item.Category, vm.ItemType); }
public void LinkIsSetFromSocketGroup() { var item = new MockModdableItem() { Sockets = SocketGroup.Parse("B-B-B") }; var vm = ItemViewModel.CreateViewModel(item); Assert.AreEqual(3, vm.Link.Value); }
public void FracturedPropertyIsSetForModdableItems() { var item = new MockModdableItem() { Fractured = true }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.FracturedItem.Value); Assert.AreEqual("Fractured", vm.FracturedItem.Name); }
public void ItemTotalResistsIsSet() { var item = new MockModdableItem() { FireResistance = 5, ColdResistance = 5, ChaosResistance = 5 }; var vm = ItemViewModel.CreateViewModel(item); Assert.AreEqual(15, vm.TotalResistances.Value); }
public void ItemExplicitsAreAllCheckedIfItemIsUnique() { var mod = Mod.Parse("foo"); var item = new MockModdableItem() { Rarity = Rarity.Unique, ExplicitMods = new Mod[] { mod, mod } }; var vm = ItemViewModel.CreateViewModel(item); Assert.IsTrue(vm.ItemExplicits[0].Checked); Assert.IsTrue(vm.ItemExplicits[1].Checked); }
public void CreateViewModelReturnsViewModelWithItemsExplicitModsWrappedInItemModContainers() { var mods = new Mod[] { Mod.Parse("Foo"), Mod.Parse("Bar") }; var item = new MockModdableItem() { ExplicitMods = mods }; var vm = ItemViewModel.CreateViewModel(item); Assert.AreEqual(mods[0], vm.ItemExplicits[0].Mod); Assert.AreEqual(mods[1], vm.ItemExplicits[1].Mod); }