Ejemplo n.º 1
0
        public void PickItemsPage_DrawCharacterList_Default_Should_Pass()
        {
            // Arrange
            FlexLayout CharacterListFrame = (FlexLayout)page.FindByName("CharacterListFrame");

            CharacterListFrame.Children.Add(new StackLayout());

            BattleEngineViewModel.Instance.Engine.EngineSettings.CharacterList.Add(new PlayerInfoModel(new CharacterModel()));

            // Act
            page.DrawCharacterList();

            // Reset

            // Assert
            Assert.IsTrue(true); // Got to here, so it happened...
        }
Ejemplo n.º 2
0
        public void PickItemsPage_GetItemToDisplay_Click_Button_Valid_Items_Should_Pass()
        {
            // Arrange
            var item = ItemIndexViewModel.Instance.GetDefaultItem(ItemLocationEnum.Head);

            BattleEngineViewModel.Instance.Engine.EngineSettings.BattleScore.ItemModelSelectList.Add(item);
            BattleEngineViewModel.Instance.Engine.EngineSettings.BattleScore.ItemModelSelectList.Add(item);
            FlexLayout l = (FlexLayout)page.FindByName("ItemListSelectedFrame");

            l.Children.Add(new Label());
            var StackItem = page.GetItemToDisplay(item);
            var dataImage = StackItem.Children[0];

            // Act
            ((ImageButton)dataImage).PropagateUpClicked();


            // Reset

            // Assert
            Assert.IsTrue(true); // Got to here, so it happened...
        }