Beispiel #1
0
        public void raycast_target_disabled()
        {
            var inventoryPanel = Inventory_Helpers.GetInventoryPanelWithItems();
            var uiCursor       = Inventory_Helpers.GetSelectionCursor();
            var image          = uiCursor.GetComponent <Image>();

            Assert.IsFalse(image.raycastTarget);
        }
Beispiel #2
0
        public void in_default_state_shows_no_icon()
        {
            var inventoryPanel = Inventory_Helpers.GetInventoryPanelWithItems(1);
            var uiCursor       = Inventory_Helpers.GetSelectionCursor();

            Assert.IsFalse(uiCursor.IconVisible);
            Assert.IsFalse(uiCursor.GetComponent <Image>().enabled);
        }
Beispiel #3
0
        public void icon_sprite_shows_when_item_selected()
        {
            var inventoryPanel = Inventory_Helpers.GetInventoryPanelWithItems(1);
            var uiCursor       = Inventory_Helpers.GetSelectionCursor();

            inventoryPanel.Slots[0].OnPointerDown(null);

            Assert.AreSame(inventoryPanel.Slots[0].Icon, uiCursor.Icon);
        }
Beispiel #4
0
        public void icon_shows_when_item_selected()
        {
            var inventoryPanel = Inventory_Helpers.GetInventoryPanelWithItems(1);
            var uiCursor       = Inventory_Helpers.GetSelectionCursor();

            inventoryPanel.Slots[0].OnPointerDown(null);

            Assert.IsTrue(uiCursor.IconVisible);
        }