diff options
Diffstat (limited to 'MundusTests/ServiceTests/Tiles/Items/ItemControllerTests.cs')
| -rw-r--r-- | MundusTests/ServiceTests/Tiles/Items/ItemControllerTests.cs | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/MundusTests/ServiceTests/Tiles/Items/ItemControllerTests.cs b/MundusTests/ServiceTests/Tiles/Items/ItemControllerTests.cs index 497ccf3..a399e04 100644 --- a/MundusTests/ServiceTests/Tiles/Items/ItemControllerTests.cs +++ b/MundusTests/ServiceTests/Tiles/Items/ItemControllerTests.cs @@ -1,19 +1,18 @@ -using System; -using Mundus.Data; -using NUnit.Framework; -using Gtk; -using Mundus.Data.Windows; -using static Mundus.Service.Tiles.Mobs.Inventory; -using Mundus.Service.Tiles.Items; -using Mundus.Service.Tiles.Mobs; +namespace MundusTests.ServiceTests.Tiles.Items +{ + using Mundus.Service.Tiles.Items; + using Mundus.Service.Tiles.Mobs; + using NUnit.Framework; + using static Mundus.Service.Tiles.Mobs.Inventory; -namespace MundusTests.ServiceTests.Tiles.Items { [TestFixture] - public static class ItemControllerTests { + public static class ItemControllerTests + { [Test] [TestCase(InventoryPlace.Accessories, 1)] [TestCase(InventoryPlace.Hotbar, 4)] - public static void SelectsItemProperly(InventoryPlace place, int index) { + public static void SelectsItemProperly(InventoryPlace place, int index) + { ItemController.SelectItem(place, index); Assert.AreEqual(place, ItemController.SelItemPlace, "Item place isn't set correctly"); @@ -22,7 +21,8 @@ namespace MundusTests.ServiceTests.Tiles.Items { [Test] [TestCase(InventoryPlace.Hotbar, 1, InventoryPlace.Items, 1)] - public static void SwitchesDifferentItemsProperly(InventoryPlace origin, int originIndex, InventoryPlace destination, int destinationIndex) { + public static void SwitchesDifferentItemsProperly(InventoryPlace origin, int originIndex, InventoryPlace destination, int destinationIndex) + { ItemController.SelectItem(destination, destinationIndex); var destinationItem = Inventory.GetPlayerItemFromItemSelection(); @@ -32,18 +32,22 @@ namespace MundusTests.ServiceTests.Tiles.Items { ItemController.SwitchItems(destination, destinationIndex); ItemController.SelectItem(origin, originIndex); - if (Inventory.GetPlayerItemFromItemSelection() != null) { + if (Inventory.GetPlayerItemFromItemSelection() != null) + { Assert.AreEqual(destinationItem.stock_id, Inventory.GetPlayerItemFromItemSelection().stock_id); } - else { + else + { Assert.Pass(); } ItemController.SelectItem(destination, destinationIndex); - if (Inventory.GetPlayerItemFromItemSelection() != null) { + if (Inventory.GetPlayerItemFromItemSelection() != null) + { Assert.AreEqual(originItem.stock_id, Inventory.GetPlayerItemFromItemSelection()); } - else { + else + { Assert.Pass(); } } |
